public class LayeredRootPart extends AbstractVisualPart<javafx.scene.Group> implements IRootPart<javafx.scene.Group>
LayeredRootPart is an IRootPart that manages a number of
layers for the visualization, namely, the content layer, feedback layer, and
handle layer. The visuals of the different IVisualParts are inserted
into these layers depending on their type, i.e. IContentPart visuals
are inserted into the content layer, IFeedbackPart visuals are
inserted into the feedback layer, and IHandlePart visuals are
inserted into the handle layer.
The layers are stacked on top of each other with the content layer at the bottom and the handle layer at the top. The feedback layer in the middle is mouse transparent, i.e. you cannot interact with the visuals in this layer.
active, adaptable, adapters, anchoragesUnmodifiable, anchoredsUnmodifiable, childrenUnmodifiable, parent, refreshVisualanchoragesUnmodifiable, anchoredsUnmodifiable, childrenUnmodifiable, parent, refreshVisualadaptersadaptableactiveIAdaptable.Bound<A extends IAdaptable>IAdaptable.Bound.Impl<T extends IAdaptable>ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTYADAPTERS_PROPERTYACTIVE_PROPERTY| Constructor and Description |
|---|
LayeredRootPart()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
activateChildren()
Activates the children of this
AbstractVisualPart. |
protected javafx.scene.Group |
createContentLayer()
Creates the content layer visual.
|
protected javafx.scene.Group |
createFeedbackLayer()
Creates the feedback layer visual.
|
protected javafx.scene.Group |
createHandleLayer()
Creates the handle layer visual.
|
protected javafx.scene.Group |
createLayer(boolean mouseTransparent)
Creates a
Group and sets its Node.pickOnBoundsProperty()
to false. |
protected void |
deactivateChildren()
Deactivates the children of this
AbstractVisualPart. |
protected IViewer |
determineViewer(IVisualPart<? extends javafx.scene.Node> parent,
Multiset<IVisualPart<? extends javafx.scene.Node>> anchoreds)
Determines the viewer reference via the given parent or any of the given
anchoreds.
|
protected void |
doAddChildVisual(IVisualPart<? extends javafx.scene.Node> child,
int index)
Performs the addition of the child's visual to this
IVisualPart's visual. |
protected void |
doAttachToAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage,
java.lang.String role)
Attaches this part's visual to the visual of the given anchorage.
|
protected javafx.scene.Group |
doCreateVisual()
Creates this part's visual.
|
protected void |
doDetachFromAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage,
java.lang.String role)
Detaches this part's visual from the visual of the given anchorage.
|
protected void |
doRefreshVisual(javafx.scene.Group visual)
Refreshes this part's visualization based on this part's content.
|
protected void |
doRemoveChildVisual(IVisualPart<? extends javafx.scene.Node> child,
int index)
Removes the child's visual from this
IVisualPart's visual. |
javafx.scene.Group |
getContentLayer()
Returns the content layer visual.
|
java.util.List<IContentPart<? extends javafx.scene.Node>> |
getContentPartChildren()
Returns all children of type
IContentPart contained by this
IRootPart. |
javafx.scene.Group |
getFeedbackLayer()
Returns the feedback layer visual.
|
java.util.List<IFeedbackPart<? extends javafx.scene.Node>> |
getFeedbackPartChildren()
Returns all children of type
IFeedbackPart contained by this
IRootPart. |
javafx.scene.Group |
getHandleLayer()
Returns the handle layer visual.
|
java.util.List<IHandlePart<? extends javafx.scene.Node>> |
getHandlePartChildren()
Returns all children of type
IHandlePart contained by this
IRootPart. |
IRootPart<? extends javafx.scene.Node> |
getRoot()
Returns the
IRootPart. |
activate, activateAdapters, activeProperty, adaptableProperty, adaptersProperty, addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, deactivate, deactivateAdapters, detachAnchored, detachFromAnchorage, detachFromAnchorage, dispose, doActivate, doDeactivate, getAdaptable, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getVisual, isActive, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, register, registerAtVisualPartMap, removeChild, removeChildren, reorderChild, setAdaptable, setAdapter, setAdapter, setAdapter, setAdapter, setParent, setRefreshVisual, unregister, unregisterFromVisualPartMap, unsetAdapterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getViewer, getVisual, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, removeChild, removeChildren, reorderChild, setParent, setRefreshVisualadaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapteradaptableProperty, getAdaptable, setAdaptableactivate, activeProperty, deactivate, isActivedisposeprotected void activateChildren()
AbstractVisualPartAbstractVisualPart.activateChildren in class AbstractVisualPart<javafx.scene.Group>protected javafx.scene.Group createContentLayer()
protected javafx.scene.Group createFeedbackLayer()
protected javafx.scene.Group createHandleLayer()
protected javafx.scene.Group createLayer(boolean mouseTransparent)
Group and sets its Node.pickOnBoundsProperty()
to false. Does also set its
Node.mouseTransparentProperty() to the given value.mouseTransparent - The value for the layer's
Node.mouseTransparentProperty().protected void deactivateChildren()
AbstractVisualPartAbstractVisualPart.deactivateChildren in class AbstractVisualPart<javafx.scene.Group>protected IViewer determineViewer(IVisualPart<? extends javafx.scene.Node> parent, Multiset<IVisualPart<? extends javafx.scene.Node>> anchoreds)
AbstractVisualPartdetermineViewer in class AbstractVisualPart<javafx.scene.Group>parent - The parent to obtain the viewer from.anchoreds - The anchoreds to alternatively obtain the viewer from.protected void doAddChildVisual(IVisualPart<? extends javafx.scene.Node> child, int index)
AbstractVisualPartIVisualPart's visual.doAddChildVisual in class AbstractVisualPart<javafx.scene.Group>child - The IVisualPart being addedindex - The child's positionAbstractVisualPart.addChild(IVisualPart, int)protected void doAttachToAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
AbstractVisualPartdoAttachToAnchorageVisual in class AbstractVisualPart<javafx.scene.Group>anchorage - The anchorage IVisualPart.role - The anchorage role.protected javafx.scene.Group doCreateVisual()
AbstractVisualPartdoCreateVisual in class AbstractVisualPart<javafx.scene.Group>protected void doDetachFromAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
AbstractVisualPartdoDetachFromAnchorageVisual in class AbstractVisualPart<javafx.scene.Group>anchorage - The anchorage IVisualPart.role - The anchorage role.protected void doRefreshVisual(javafx.scene.Group visual)
AbstractVisualPartdoRefreshVisual in class AbstractVisualPart<javafx.scene.Group>visual - This part's visual.protected void doRemoveChildVisual(IVisualPart<? extends javafx.scene.Node> child, int index)
AbstractVisualPartIVisualPart's visual.doRemoveChildVisual in class AbstractVisualPart<javafx.scene.Group>child - The child IVisualPart.index - The index of the child whose visual is to be removed.public javafx.scene.Group getContentLayer()
createContentLayer()public java.util.List<IContentPart<? extends javafx.scene.Node>> getContentPartChildren()
IRootPartIContentPart contained by this
IRootPart.getContentPartChildren in interface IRootPart<javafx.scene.Group>IContentPart children.public javafx.scene.Group getFeedbackLayer()
createFeedbackLayer()public java.util.List<IFeedbackPart<? extends javafx.scene.Node>> getFeedbackPartChildren()
IRootPartIFeedbackPart contained by this
IRootPart.getFeedbackPartChildren in interface IRootPart<javafx.scene.Group>IFeedbackPart children.public javafx.scene.Group getHandleLayer()
createHandleLayer()public java.util.List<IHandlePart<? extends javafx.scene.Node>> getHandlePartChildren()
IRootPartIHandlePart contained by this
IRootPart.getHandlePartChildren in interface IRootPart<javafx.scene.Group>IHandlePart children.public IRootPart<? extends javafx.scene.Node> getRoot()
IVisualPartIRootPart. This method should only be called
internally or by helpers such as edit policies. The root can be used to
get the viewer.getRoot in interface IVisualPart<javafx.scene.Group>getRoot in class AbstractVisualPart<javafx.scene.Group>null or the IRootPartCopyright (c) 2014, 2016 itemis AG and others. All rights reserved.