com.vaadin.ui.

Class Tree.TreeRenderer

    • Constructor Detail

      • TreeRenderer

        protected TreeRenderer()

        Constructs a new TreeRenderer.

    • 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 interface DataGenerator<T>

        Parameters:

        item - the data item being serialized

        jsonObject - 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 interface DataGenerator<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 interface DataGenerator<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 class AbstractRenderer<T,​String>

        Returns:

        The shared state for this connector. Never null.