Package com.vaadin.ui
Class Grid.DetailsManager<T>
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.server.AbstractExtension
-
- com.vaadin.ui.AbstractListing.AbstractListingExtension<T>
-
- com.vaadin.ui.Grid.AbstractGridExtension<T>
-
- com.vaadin.ui.Grid.DetailsManager<T>
-
- Type Parameters:
T- the grid bean type
- All Implemented Interfaces:
DataGenerator<T>,MethodEventSource,ClientConnector,Extension,Connector,Serializable
public static class Grid.DetailsManager<T> extends Grid.AbstractGridExtension<T>
Class for managing visible details rows.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
-
Constructor Summary
Constructors Constructor Description DetailsManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroyData(T item)Informs theDataGeneratorthat the given data item has been dropped and is no longer needed.voidgenerateData(T item, elemental.json.JsonObject jsonObject)Adds custom data for the given item to its serializedJsonObjectrepresentation.Grid<T>getParent()Gets the parent connector of this connector, ornullif the connector is not attached to any parent.protected DetailsManagerStategetState()Returns the shared state for this connector.protected DetailsManagerStategetState(boolean markAsDirty)Returns the shared state for this connector.booleanisDetailsVisible(T item)Returns the visibility of details component for given item.voidremove()Remove this extension from its target.voidsetDetailsGenerator(DetailsGenerator<T> generator)Sets the details component generator.voidsetDetailsVisible(T item, boolean visible)Sets the visibility of details component for given item.-
Methods inherited from class com.vaadin.ui.Grid.AbstractGridExtension
addComponentToGrid, extend, getInternalIdForColumn, removeComponentFromGrid
-
Methods inherited from class com.vaadin.ui.AbstractListing.AbstractListingExtension
getData, refresh
-
Methods inherited from class com.vaadin.server.AbstractExtension
extend, getSupportedParentType, setParent
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.data.provider.DataGenerator
destroyAllData, refreshData
-
-
-
-
Method Detail
-
setDetailsGenerator
public void setDetailsGenerator(DetailsGenerator<T> generator)
Sets the details component generator.- Parameters:
generator- the generator for details components
-
remove
public void remove()
Description copied from interface:ExtensionRemove this extension from its target. After an extension has been removed, it cannot be attached again.- Specified by:
removein interfaceExtension- Overrides:
removein classAbstractListing.AbstractListingExtension<T>
-
generateData
public void generateData(T item, elemental.json.JsonObject jsonObject)
Description copied from interface:DataGeneratorAdds custom data for the given item to its serializedJsonObjectrepresentation. This JSON object will be sent to client-side DataProvider.- Parameters:
item- the data item being serializedjsonObject- the JSON object being sent to the client
-
destroyData
public void destroyData(T item)
Description copied from interface:DataGeneratorInforms theDataGeneratorthat the given data item has been dropped and is no longer needed. This method should clean up any unneeded information stored for this item.- Parameters:
item- the dropped data item
-
setDetailsVisible
public void setDetailsVisible(T item, boolean visible)
Sets the visibility of details component for given item.- Parameters:
item- the item to show details forvisible-trueif details component should be visible;falseif it should be hidden
-
isDetailsVisible
public boolean isDetailsVisible(T item)
Returns the visibility of details component for given item.- Parameters:
item- the item to show details for- Returns:
trueif details component should be visible;falseif it should be hidden
-
getParent
public Grid<T> getParent()
Description copied from interface:ConnectorGets the parent connector of this connector, ornullif the connector is not attached to any parent.- Specified by:
getParentin interfaceClientConnector- Specified by:
getParentin interfaceConnector- Overrides:
getParentin classGrid.AbstractGridExtension<T>- Returns:
- the parent connector, or
nullif there is no parent.
-
getState
protected DetailsManagerState getState()
Description copied from class:AbstractClientConnectorReturns the shared state for this connector. The shared state object is shared between the server connector and the client connector. Changes are only communicated from the server to the client and not in the other direction.As a side effect, marks the connector dirty so any changes done to the state will be sent to the client. Use
getState(false)to avoid marking the connector as dirty.- Overrides:
getStatein classGrid.AbstractGridExtension<T>- Returns:
- The shared state for this connector. Never null.
-
getState
protected DetailsManagerState getState(boolean markAsDirty)
Description copied from class:AbstractClientConnectorReturns the shared state for this connector.- Overrides:
getStatein classGrid.AbstractGridExtension<T>- Parameters:
markAsDirty- true if the connector should automatically be marked dirty, false otherwise- Returns:
- The shared state for this connector. Never null.
- See Also:
AbstractClientConnector.getState()
-
-