T - the data typepublic abstract class AbstractComponentDataGenerator<T> extends Object implements DataGenerator<T>
| Constructor and Description |
|---|
AbstractComponentDataGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Component |
createComponent(T item)
Creates a new component based on the provided item.
|
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. |
protected abstract Element |
getContainer()
Gets the element where the generated components will be attached to.
|
protected abstract String |
getItemKey(T item)
Gets a unique key for a given item.
|
protected Component |
getRenderedComponent(String itemKey) |
void |
refreshData(T item)
Informs the
DataGenerator that a data object has been updated. |
protected void |
registerRenderedComponent(String itemKey,
Component component)
Appends the component to the container and registers it for future use
during the lifecycle of the generator.
|
protected Component |
updateComponent(Component currentComponent,
T item)
Updates an existing component after the item has been updated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateDatapublic void refreshData(T item)
DataGeneratorDataGenerator that a data object has been updated.
This method should update any unneeded information stored for given item.refreshData in interface DataGenerator<T>item - the updated itempublic void destroyData(T item)
DataGeneratorDataGenerator 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()
DataGeneratorDataGenerator that all data has been dropped. This
method should clean up any unneeded information stored for items.destroyAllData in interface DataGenerator<T>protected abstract Element getContainer()
protected abstract Component createComponent(T item)
item - the data item, possibly nullComponent which represents the provided itemprotected Component updateComponent(Component currentComponent, T item)
createComponent(Object).currentComponent - the current component used to represent the item, not
nullitem - the updated itemnullprotected abstract String getItemKey(T item)
item - the model itemprotected void registerRenderedComponent(String itemKey, Component component)
itemKey - the key of the model itemcomponent - the component to be attached to the containerCopyright © 2025. All rights reserved.