Input
- the state the extension operates on.public class RenderCoreExtension<Input,State>
extends java.lang.Object
Constructor and Description |
---|
RenderCoreExtension() |
Modifier and Type | Method and Description |
---|---|
static void |
afterMount(MountDelegate mountDelegate)
Calls
MountExtension.afterMount(ExtensionState) for each RenderCoreExtension
that has a mount phase. |
static void |
beforeMount(Host host,
MountDelegate mountDelegate,
java.util.List<<any>> results)
Calls
MountExtension.beforeMount(ExtensionState, Object, Rect) for each RenderCoreExtension that has a mount phase. |
Input |
createInput()
Should return a new
Input > to which the LayoutResultVisitor can write into. |
LayoutResultVisitor<? extends Input> |
getLayoutVisitor()
The extension can optionally return a
LayoutResultVisitor for every layout pass which
will visit every LayoutResult . |
MountExtension<? extends Input,State> |
getMountExtension()
The extension can optionally return a
MountExtension which can be used to augment the
RenderCore's mounting phase. |
static void |
notifyVisibleBoundsChanged(MountDelegateTarget target,
Host host)
Calls
MountExtension.onVisibleBoundsChanged(ExtensionState, Rect) for each RenderCoreExtension that has a mount phase. |
static void |
recursivelyNotifyVisibleBoundsChanged(java.lang.Object content) |
static void |
recursivelyNotifyVisibleBoundsChanged(java.lang.Object content,
Systracer tracer) |
static boolean |
shouldUpdate(java.util.List<<any>> current,
java.util.List<<any>> next)
returns
false iff the results have the same RenderCoreExtension s. |
public LayoutResultVisitor<? extends Input> getLayoutVisitor()
LayoutResultVisitor
for every layout pass which
will visit every LayoutResult
. The visitor should be functional and immutable.LayoutResultVisitor
.public MountExtension<? extends Input,State> getMountExtension()
MountExtension
which can be used to augment the
RenderCore's mounting phase. The Input >
collected in the latest layout pass will be
passed to the extension before mount.MountExtension
.public Input createInput()
Input >
to which the LayoutResultVisitor
can write into.Input >
for LayoutResultVisitor
to write into.public static void beforeMount(Host host, MountDelegate mountDelegate, java.util.List<<any>> results)
MountExtension.beforeMount(ExtensionState, Object, Rect)
for each RenderCoreExtension
that has a mount phase.host
- The Host
of the extensions.mountDelegate
- The MountDelegate
.results
- A map of RenderCoreExtension
to their results from the layout phase.public static void afterMount(MountDelegate mountDelegate)
MountExtension.afterMount(ExtensionState)
for each RenderCoreExtension
that has a mount phase.mountDelegate
- The MountDelegate
.public static void notifyVisibleBoundsChanged(MountDelegateTarget target, Host host)
MountExtension.onVisibleBoundsChanged(ExtensionState, Rect)
for each RenderCoreExtension
that has a mount phase.host
- The Host
of the extensionspublic static boolean shouldUpdate(java.util.List<<any>> current, java.util.List<<any>> next)
false
iff the results have the same RenderCoreExtension
s.public static void recursivelyNotifyVisibleBoundsChanged(java.lang.Object content)
public static void recursivelyNotifyVisibleBoundsChanged(java.lang.Object content, Systracer tracer)