public final class Tree.TreeRenderer extends AbstractRenderer<T,String> implements DataGenerator<T>
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Modifier | Constructor and Description |
---|---|
protected |
TreeRenderer()
Constructs a new TreeRenderer.
|
Modifier and Type | Method and 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,
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.
|
encode, encode, extend, getNullRepresentation, getParent, getParentGrid, getPresentationType, getSupportedParentType
remove, setParent
addAttachListener, addDetachListener, addExtension, 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, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
refreshData
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
public void generateData(T item, JsonObject jsonObject)
DataGenerator
JsonObject
representation. This JSON object will be sent to client-side
DataProvider.generateData
in interface DataGenerator<T>
item
- the data item being serializedjsonObject
- the JSON object being sent to the clientpublic void destroyData(T item)
DataGenerator
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.destroyData
in interface DataGenerator<T>
item
- the dropped data itempublic void destroyAllData()
DataGenerator
DataGenerator
that all data has been dropped. This
method should clean up any unneeded information stored for items.destroyAllData
in interface DataGenerator<T>
protected TreeRendererState getState()
AbstractClientConnector
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.
getState
in class AbstractRenderer<T,String>
protected TreeRendererState getState(boolean markAsDirty)
AbstractClientConnector
getState
in class AbstractRenderer<T,String>
markAsDirty
- true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()
Copyright © 2020 Vaadin Ltd. All rights reserved.