com.vaadin.ui.
Class Tree.TreeRenderer
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.server.AbstractExtension
-
- com.vaadin.ui.renderers.AbstractRenderer<T,String>
-
- com.vaadin.ui.Tree.TreeRenderer
-
All Implemented Interfaces:
DataGenerator<T>
,MethodEventSource
,ClientConnector
,Extension
,Connector
,Renderer<String>
,Serializable
public final class Tree.TreeRenderer extends AbstractRenderer<T,String> implements DataGenerator<T>
String renderer that handles icon resources and stores their identifiers into data objects.
Since:
8.1
See Also:
-
-
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 Modifier Constructor Description protected
TreeRenderer()
Constructs a new TreeRenderer.
-
Method Summary
All Methods Modifier and Type Method Description void
destroyAllData()
Informs the
DataGenerator
that all data has been dropped.void
destroyData(T item)
Informs the
DataGenerator
that the given data item has been dropped and is no longer needed.void
generateData(T item, elemental.json.JsonObject jsonObject)
Adds custom data for the given item to its serialized
JsonObject
representation.protected TreeRendererState
getState()
Returns the shared state for this connector.
protected TreeRendererState
getState(boolean markAsDirty)
Returns the shared state for this connector.
-
Methods inherited from class com.vaadin.ui.renderers.AbstractRenderer
encode, encode, extend, getNullRepresentation, getParent, getParentGrid, getPresentationType, getSupportedParentType
-
Methods inherited from class com.vaadin.server.AbstractExtension
remove, 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
refreshData
-
-
-
-
Method Detail
-
generateData
public void generateData(T item, elemental.json.JsonObject jsonObject)
Description copied from interface:
DataGenerator
Adds custom data for the given item to its serialized
JsonObject
representation. This JSON object will be sent to client-side DataProvider.Specified by:
generateData
in interfaceDataGenerator<T>
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:
DataGenerator
Informs the
DataGenerator
that the given data item has been dropped and is no longer needed. This method should clean up any unneeded information stored for this item.Specified by:
destroyData
in interfaceDataGenerator<T>
Parameters:
item
- the dropped data item
-
destroyAllData
public void destroyAllData()
Description copied from interface:
DataGenerator
Informs the
DataGenerator
that all data has been dropped. This method should clean up any unneeded information stored for items.Specified by:
destroyAllData
in interfaceDataGenerator<T>
-
getState
protected TreeRendererState getState()
Description copied from class:
AbstractClientConnector
Returns 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:
getState
in classAbstractRenderer<T,String>
Returns:
The shared state for this connector. Never null.
-
getState
protected TreeRendererState getState(boolean markAsDirty)
Description copied from class:
AbstractClientConnector
Returns the shared state for this connector.
Overrides:
getState
in classAbstractRenderer<T,String>
Parameters:
markAsDirty
- true if the connector should automatically be marked dirty, false otherwiseReturns:
The shared state for this connector. Never null.
See Also:
-
-