public final class HideableDataDiffSection<T> extends Section
HideableDataDiffSectionSpec
that wraps a DataDiffSectionSpec
. It provides the
ability to remove an item from the DataDiffSection via the HideItemEvent
. This Section
emits the following events:
RenderWithHideItemHandlerEvent
whenever it needs a Component
to render a model
T from the list of data. A HideItemEvent
handler is a param of this event. Providing an
handler for this OnEvent
is mandatory.
GetUniqueIdentifierEvent
is fired when a single unique identifier is needed for a
model object.
Modifier and Type | Class and Description |
---|---|
static class |
HideableDataDiffSection.Builder<T> |
generateUniqueGlobalKeyForChild, getChildren, getEventDispatcher, getGlobalKey, getHandle, getKey, getLogTag, getParent, getScopedContext, getSimpleName, makeShallowCopy, recordEventTrigger, setChildren, setCount, setGlobalKey, setKey, setScopedContext
acceptTriggerEvent, bindService, createService, dataBound, dataRendered, dispatchLoadingEvent, generateChangeSet, getEventTrigger, getEventTrigger, getLoadingEventHandler, getService, getTreePropsForChildren, isDiffSectionSpec, isSectionIndexValid, newEventHandler, newEventHandler, newEventTrigger, populateTreeProps, refresh, requestFocus, requestFocus, requestFocus, requestFocusWithOffset, requestFocusWithOffset, requestFocusWithOffset, requestSmoothFocus, requestSmoothFocus, requestSmoothFocus, shouldUpdate, transferService, unbindService, viewportChanged
protected StateContainer getStateContainer()
getStateContainer
in class Section
public boolean isEquivalentTo(Section other)
Section
This is used to be able to skip rendering a section again. We avoid using the Object.equals(Object)
so we can optimize the code better over time since we don't have to
adhere to the contract required for a equals method.
isEquivalentTo
in interface Equivalence<Section>
isEquivalentTo
in class Section
other
- the component to compare topublic HideableDataDiffSection makeShallowCopy(boolean deepCopy)
makeShallowCopy
in class Section
Section
. if deepCopy is false the clone won't contain any
children or count as it will be returned in a pre - ChangeSet generation state.public static <T> HideableDataDiffSection.Builder<T> create(SectionContext context)
protected void transferState(StateContainer _prevStateContainer, StateContainer _nextStateContainer)
SectionLifecycle
transferState
in class SectionLifecycle
protected static void onBlacklistUpdate(SectionContext c, Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
protected static void onBlacklistUpdateAsync(SectionContext c, Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
protected static void onBlacklistUpdateSync(SectionContext c, Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
public static EventHandler getRenderWithHideItemHandlerEventHandler(SectionContext context)
public static EventHandler getGetUniqueIdentifierEventHandler(SectionContext context)
public static EventHandler<RenderEvent> onRenderEvent(SectionContext c)
public static EventHandler<HideItemEvent> onHideItem(SectionContext c)
public Object dispatchOnEvent(EventHandler eventHandler, Object eventState)
dispatchOnEvent
in interface EventDispatcher
dispatchOnEvent
in class SectionLifecycle
protected void createInitialState(SectionContext c)
createInitialState
in class SectionLifecycle
protected Children createChildren(SectionContext c)
SectionLifecycle
GroupSectionSpec
method annotated with OnCreateChildren
createChildren
in class SectionLifecycle