public abstract class MountExtension<Input,State>
extends java.lang.Object
Constructor and Description |
---|
MountExtension() |
Modifier and Type | Method and Description |
---|---|
void |
afterMount(ExtensionState<State> extensionState)
Called immediately after mounting.
|
void |
beforeMount(ExtensionState<State> extensionState,
Input input,
Rect localVisibleRect)
Called for setting up input on the extension before mounting.
|
void |
beforeMountItem(ExtensionState<State> extensionState,
RenderTreeNode renderTreeNode,
int index) |
boolean |
canPreventMount() |
ExtensionState<State> |
createExtensionState(MountDelegate mountDelegate) |
protected abstract State |
createState() |
protected static java.lang.Object |
getContentAt(ExtensionState<?> extensionState,
int position) |
protected static java.lang.Object |
getContentById(ExtensionState<?> extensionState,
long id) |
static MountDelegateTarget |
getMountTarget(ExtensionState<?> extensionState) |
protected static boolean |
isLockedForMount(ExtensionState<?> extensionState,
RenderTreeNode renderTreeNode) |
protected static boolean |
isLockedForMount(ExtensionState extensionState,
long id) |
protected static boolean |
isRootItem(long id) |
void |
onBindItem(ExtensionState<State> extensionState,
RenderUnit<?> renderUnit,
java.lang.Object content,
java.lang.Object layoutData)
Called after an item is bound, after it gets mounted or updated.
|
void |
onBoundsAppliedToItem(ExtensionState<State> extensionState,
RenderUnit<?> renderUnit,
java.lang.Object content,
java.lang.Object layoutData) |
void |
onMountItem(ExtensionState<State> extensionState,
RenderUnit<?> renderUnit,
java.lang.Object content,
java.lang.Object layoutData)
Called after an item is mounted.
|
void |
onUnbind(ExtensionState<State> extensionState)
Called after all the Host's children have been unbound.
|
void |
onUnbindItem(ExtensionState<State> extensionState,
RenderUnit<?> renderUnit,
java.lang.Object content,
java.lang.Object layoutData)
Called after an item is unbound.
|
void |
onUnmount(ExtensionState<State> extensionState)
Called after all the Host's children have been unmounted.
|
void |
onUnmountItem(ExtensionState<State> extensionState,
RenderUnit<?> renderUnit,
java.lang.Object content,
java.lang.Object layoutData)
Called after an item is unmounted.
|
void |
onVisibleBoundsChanged(ExtensionState<State> extensionState,
Rect localVisibleRect)
Called when the visible bounds of the Host change.
|
boolean |
shouldUpdateItem(RenderUnit<?> previousRenderUnit,
java.lang.Object previousLayoutData,
RenderUnit<?> nextRenderUnit,
java.lang.Object nextLayoutData)
Called when an item is already mounted.
|
public final ExtensionState<State> createExtensionState(MountDelegate mountDelegate)
protected abstract State createState()
public boolean canPreventMount()
public void beforeMount(ExtensionState<State> extensionState, Input input, Rect localVisibleRect)
extensionState
- The inner state of this extension when beforeMount is called.input
- The new input the extension should use.public void beforeMountItem(ExtensionState<State> extensionState, RenderTreeNode renderTreeNode, int index)
public void afterMount(ExtensionState<State> extensionState)
public void onVisibleBoundsChanged(ExtensionState<State> extensionState, Rect localVisibleRect)
public void onUnmount(ExtensionState<State> extensionState)
public void onUnbind(ExtensionState<State> extensionState)
public boolean shouldUpdateItem(RenderUnit<?> previousRenderUnit, java.lang.Object previousLayoutData, RenderUnit<?> nextRenderUnit, java.lang.Object nextLayoutData)
public void onBindItem(ExtensionState<State> extensionState, RenderUnit<?> renderUnit, java.lang.Object content, java.lang.Object layoutData)
public void onUnbindItem(ExtensionState<State> extensionState, RenderUnit<?> renderUnit, java.lang.Object content, java.lang.Object layoutData)
public void onUnmountItem(ExtensionState<State> extensionState, RenderUnit<?> renderUnit, java.lang.Object content, java.lang.Object layoutData)
public void onMountItem(ExtensionState<State> extensionState, RenderUnit<?> renderUnit, java.lang.Object content, java.lang.Object layoutData)
public void onBoundsAppliedToItem(ExtensionState<State> extensionState, RenderUnit<?> renderUnit, java.lang.Object content, java.lang.Object layoutData)
public static MountDelegateTarget getMountTarget(ExtensionState<?> extensionState)
protected static boolean isRootItem(long id)
protected static java.lang.Object getContentAt(ExtensionState<?> extensionState, int position)
protected static java.lang.Object getContentById(ExtensionState<?> extensionState, long id)
protected static boolean isLockedForMount(ExtensionState<?> extensionState, RenderTreeNode renderTreeNode)
protected static boolean isLockedForMount(ExtensionState extensionState, long id)