public class ContentBehavior extends AbstractBehavior implements IDisposable
IRootPart or an
IContentPart to synchronize the list of IContentPart children
and (only in case of an IContentPart) anchorages with the list of
content children and anchored.active, adaptableIAdaptable.Bound.Impl<T extends IAdaptable>ACTIVE_PROPERTY| Constructor and Description |
|---|
ContentBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
protected void |
disposeIfObsolete(IContentPart<? extends javafx.scene.Node> contentPart)
If the given
IContentPart does neither have a parent nor any
anchoreds, then it's content is set to null and the part is
added to the ContentPartPool. |
protected void |
doActivate()
Post
AbstractBehavior.activate() hook that may be overwritten to e.g. register
listeners. |
protected void |
doDeactivate()
Pre
AbstractBehavior.deactivate() hook that may be overwritten to e.g. unregister
listeners. |
protected IContentPart<? extends javafx.scene.Node> |
findOrCreatePartFor(java.lang.Object content)
Finds/Revives/Creates an
IContentPart for the given
content Object. |
protected IContentPartFactory |
getContentPartFactory()
Returns the
IContentPartFactory of the current viewer. |
protected ContentPartPool |
getContentPartPool()
Returns the
ContentPartPool that is used to recycle content parts
in the context of an IViewer. |
void |
synchronizeContentPartAnchorages(IVisualPart<? extends javafx.scene.Node> anchored,
com.google.common.collect.SetMultimap<? extends java.lang.Object,? extends java.lang.String> contentAnchorages)
Updates the host
IVisualPart's IContentPart anchorages
(see IVisualPart.getAnchoragesUnmodifiable()) so that it is in
sync with the set of content anchorages that is passed in. |
void |
synchronizeContentPartChildren(IVisualPart<? extends javafx.scene.Node> parent,
java.util.List<? extends java.lang.Object> contentChildren)
Updates the host
IVisualPart's IContentPart children (see
IVisualPart.getChildrenUnmodifiable()) so that it is in sync with
the set of content children that is passed in. |
activate, activeProperty, adaptableProperty, addAnchoreds, addAnchoreds, addFeedback, addFeedback, addHandles, addHandles, clearFeedback, clearHandles, deactivate, getAdaptable, getFeedback, getFeedback, getFeedbackPartFactory, getFeedbackPartFactory, getFeedbackPerTargetSet, getHandlePartFactory, getHandlePartFactory, getHandles, getHandles, getHandlesPerTargetSet, getHost, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandlespublic void dispose()
dispose in interface IDisposableprotected void disposeIfObsolete(IContentPart<? extends javafx.scene.Node> contentPart)
IContentPart does neither have a parent nor any
anchoreds, then it's content is set to null and the part is
added to the ContentPartPool.contentPart - The IContentPart that is eventually disposed.protected void doActivate()
AbstractBehaviorAbstractBehavior.activate() hook that may be overwritten to e.g. register
listeners.doActivate in class AbstractBehaviorprotected void doDeactivate()
AbstractBehaviorAbstractBehavior.deactivate() hook that may be overwritten to e.g. unregister
listeners.doDeactivate in class AbstractBehaviorprotected IContentPart<? extends javafx.scene.Node> findOrCreatePartFor(java.lang.Object content)
IContentPart for the given
content Object. If an IContentPart for the given
content Object can be found in the viewer's content-part-map,
then this part is returned. If an IContentPart for the given
content Object is stored in the ContentPartPool, then
this part is returned. Otherwise, the injected
IContentPartFactory is used to create a new IContentPart
for the given content Object.content - The content Object for which the corresponding
IContentPart is to be returned.IContentPart corresponding to the given
content Object.protected IContentPartFactory getContentPartFactory()
IContentPartFactory of the current viewer.IContentPartFactory of the current viewer.protected ContentPartPool getContentPartPool()
ContentPartPool that is used to recycle content parts
in the context of an IViewer.ContentPartPool of the IViewer.public void synchronizeContentPartAnchorages(IVisualPart<? extends javafx.scene.Node> anchored, com.google.common.collect.SetMultimap<? extends java.lang.Object,? extends java.lang.String> contentAnchorages)
IVisualPart's IContentPart anchorages
(see IVisualPart.getAnchoragesUnmodifiable()) so that it is in
sync with the set of content anchorages that is passed in.anchored - The anchored IVisualPart whose content part anchorages
to synchronize with the given content anchorages.contentAnchorages - * The map of content anchorages with roles to be synchronized
with the list of IContentPart anchorages (
IVisualPart.getAnchoragesUnmodifiable()).IContentPart.getContentAnchoragesUnmodifiable(),
IVisualPart.getAnchoragesUnmodifiable()public void synchronizeContentPartChildren(IVisualPart<? extends javafx.scene.Node> parent, java.util.List<? extends java.lang.Object> contentChildren)
IVisualPart's IContentPart children (see
IVisualPart.getChildrenUnmodifiable()) so that it is in sync with
the set of content children that is passed in.parent - The parent IVisualPart whose content part children to
synchronize against the given content children.contentChildren - The list of content part children to be synchronized with the
list of IContentPart children (
IVisualPart.getChildrenUnmodifiable()).IContentPart.getContentChildrenUnmodifiable(),
IVisualPart.getChildrenUnmodifiable()Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.