Interface IVisualPart<V extends javafx.scene.Node>
- Type Parameters:
- V- The visual node used by this- IVisualPart.
- All Superinterfaces:
- IActivatable,- IAdaptable,- IAdaptable.Bound<IViewer>,- IDisposable
- All Known Subinterfaces:
- IBendableContentPart<V>,- IContentPart<V>,- IFeedbackPart<V>,- IHandlePart<V>,- IResizableContentPart<V>,- IRootPart<V>,- ITransformableContentPart<V>
- All Known Implementing Classes:
- AbstractContentPart,- AbstractFeedbackPart,- AbstractHandlePart,- AbstractSegmentHandlePart,- AbstractVisualPart,- CircleSegmentHandlePart,- FocusFeedbackPart,- HoverFeedbackPart,- LayeredRootPart,- RectangleSegmentHandlePart,- SelectionFeedbackPart,- SelectionLinkFeedbackPart,- SnappingFeedbackPart,- SquareSegmentHandlePart
IVisualPart plays the controller role in the model-view-controller
 architecture. While it does not have to be bound to a model (actually only
 IContentParts are bound to model elements, IFeedbackParts and
 IHandleParts do not refer to model elements), an IVisualPart
 always controls a visual.
 
 Within an IViewer, IVisualPart are organized in a hierarchy
 via a [1:n] parent-children relationship (getParent(),
 getChildrenUnmodifiable()), which roots in an IRootPart.
 Furthermore a [n:m] anchorage-anchored relationship (
 getAnchoragesUnmodifiable() , getAnchoredsUnmodifiable())
 may be established between IVisualParts located at arbitrary places
 within the hierarchy.
 
 An IVisualPart is adaptable (IAdaptable). Usually,
 IPolicys and IBehaviors are adapted to it (but arbitrary
 adapters may indeed be registered as needed). IPolicys are usually
 required in case the IVisualPart is directly involved in user
 interaction (e.g. the user clicks on its controlled visual). They may be
 accessed type-safe by IGestures or other IPolicys (
 IPolicys may delegate to other IPolicys)). IBehaviors
 are used to react to changes of the attached model (in case of an
 IContentParts), the viewer models, or others sources (e.g. adapters
 of the IViewer or IDomain), thereby reacting to changes of
 the interactive state.
 
 IVisualParts are IActivatable activatable, and an
 activation/deactivation of an IVisualPart will result in the
 activation/deactivation of all registered adapters (i.e. IPolicys and
 IBehaviors).
 
 An IVisualPart is responsible for registering itself for its
 visualization at the IViewer.getVisualPartMap() when it obtains a
 link to the IViewer. Equally, an IVisualPart is responsible
 for unregistering itself for its visualization from the
 IViewer.getVisualPartMap() when it loses a link to the
 IViewer.
- Noimplement:
- This interface is not intended to be implemented by clients.
              Instead, AbstractVisualPartshould be subclassed.
- 
Property SummaryPropertiesTypePropertyDescriptionReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,String> Returns a read-only set-multimap property containing this part's anchorages and their corresponding roles.ReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>>Returns an unmodifiable read-only multiset property representing the anchoreds of thisIVisualPart.javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>>Returns an unmodifiable read-only property containing the children of thisIVisualPart.javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>>Returns a read-only property that refers to the parent of thisIVisualPart.javafx.beans.property.BooleanPropertyA boolean property indicating whether thisIVisualPartshould refresh its visuals or not.Properties inherited from interface org.eclipse.gef.common.activate.IActivatableactiveProperties inherited from interface org.eclipse.gef.common.adapt.IAdaptableadaptersProperties inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Boundadaptable
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptableIAdaptable.Bound<A extends IAdaptable>Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.BoundIAdaptable.Bound.Impl<T extends IAdaptable>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringName of the property storing this part's anchorages.static final StringName of the property storing this part's anchoreds.static final StringName of the property storing this part's children.static final StringName of the property storing this part's parent.static final StringName of the property storing the refresh visual boolean property.Fields inherited from interface org.eclipse.gef.common.activate.IActivatableACTIVE_PROPERTYFields inherited from interface org.eclipse.gef.common.adapt.IAdaptableADAPTERS_PROPERTY
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddChild(IVisualPart<? extends javafx.scene.Node> child) Adds the given child to the list of this part's children.voidaddChild(IVisualPart<? extends javafx.scene.Node> child, int index) Adds the given child to the list of this part's children at the specified index.voidaddChildren(List<? extends IVisualPart<? extends javafx.scene.Node>> children) Adds the given children to the list of this part's children.voidaddChildren(List<? extends IVisualPart<? extends javafx.scene.Node>> children, int index) Adds the given children to the list of this part's children at the specified index.ReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,String> Returns a read-only set-multimap property containing this part's anchorages and their corresponding roles.ReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>>Returns an unmodifiable read-only multiset property representing the anchoreds of thisIVisualPart.voidattachAnchored(IVisualPart<? extends javafx.scene.Node> anchored) Used by an anchoredIVisualPartto establish an anchorage-anchored relationship with this anchorageIVisualPart.voidattachToAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage) Attaches the givenIVisualPartto the given anchorage under the "default" role.voidattachToAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Attaches the givenIVisualPartto the given anchorage under the given role.javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>>Returns an unmodifiable read-only property containing the children of thisIVisualPart.voiddetachAnchored(IVisualPart<? extends javafx.scene.Node> anchored) Used by an anchoredIVisualPartto unestablish an anchorage-anchored relationship with this anchorageIVisualPart.voiddetachFromAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage) Detaches thisIVisualPartfrom the given anchorageIVisualPartunder the 'default' role.voiddetachFromAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Detaches thisIVisualPartfrom the given anchorageIVisualPartunder the given role.ObservableSetMultimap<IVisualPart<? extends javafx.scene.Node>,String> Returns an unmodifiableObservableSetMultimapof this part's anchorages and their corresponding roles.ObservableMultiset<IVisualPart<? extends javafx.scene.Node>>Returns an unmodifiableObservableMultisetof this part's anchoreds.Map<AdapterKey<? extends IBehavior>,IBehavior> Returns aMapof this part's behaviors and their correspondingAdapterKeys.javafx.collections.ObservableList<IVisualPart<? extends javafx.scene.Node>>Returns an unmodifiableObservableListof this part's children.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.handlers.IHandler>,org.eclipse.gef.mvc.fx.handlers.IHandler> Returns aMapof this part's handlers and their correspondingAdapterKeys.IVisualPart<? extends javafx.scene.Node>Returns the parent of this part.Map<AdapterKey<? extends IPolicy>,IPolicy> Returns aMapof this part's policies and their correspondingAdapterKeys.IRootPart<? extends javafx.scene.Node>getRoot()Returns theIRootPart.default IViewerReturns theIViewerthisIVisualPartis bound to.Returns this part's visual.booleanReturnstrueif this part is allowed to refresh its visualization based on its content.javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>>Returns a read-only property that refers to the parent of thisIVisualPart.voidRefreshes this part's visualization based on this part's content.javafx.beans.property.BooleanPropertyA boolean property indicating whether thisIVisualPartshould refresh its visuals or not.voidremoveChild(IVisualPart<? extends javafx.scene.Node> child) Removes the givenIVisualPartfrom the list of this part's children.voidremoveChildren(List<? extends IVisualPart<? extends javafx.scene.Node>> children) Removes the givenIVisualParts from the list of this part's children.voidreorderChild(IVisualPart<? extends javafx.scene.Node> child, int index) Swaps the givenIVisualPartwith the part at the given index position within this part's list of children.voidsetParent(IVisualPart<? extends javafx.scene.Node> parent) Used by a parentIVisualPartto establish/unestablish a parent-child relationship with this childIVisualPart.voidsetRefreshVisual(boolean refreshVisual) Allows to temporarily turnrefreshVisual()into a no-op operation.Methods inherited from interface org.eclipse.gef.common.activate.IActivatableactivate, activeProperty, deactivate, isActiveMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptableadaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapterMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.BoundadaptableProperty, getAdaptable, setAdaptableMethods inherited from interface org.eclipse.gef.common.dispose.IDisposabledispose
- 
Property Details- 
anchoragesUnmodifiableReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,String> anchoragesUnmodifiablePropertyReturns a read-only set-multimap property containing this part's anchorages and their corresponding roles.- See Also:
 
- 
anchoredsUnmodifiableReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>> anchoredsUnmodifiablePropertyReturns an unmodifiable read-only multiset property representing the anchoreds of thisIVisualPart.- See Also:
 
- 
childrenUnmodifiablejavafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> childrenUnmodifiablePropertyReturns an unmodifiable read-only property containing the children of thisIVisualPart.- See Also:
 
- 
parentjavafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>> parentPropertyReturns a read-only property that refers to the parent of thisIVisualPart.- See Also:
 
- 
refreshVisualjavafx.beans.property.BooleanProperty refreshVisualPropertyA boolean property indicating whether thisIVisualPartshould refresh its visuals or not.- See Also:
 
 
- 
- 
Field Details- 
PARENT_PROPERTYName of the property storing this part's parent.- See Also:
 
- 
CHILDREN_PROPERTYName of the property storing this part's children.- See Also:
 
- 
ANCHORAGES_PROPERTYName of the property storing this part's anchorages.- See Also:
 
- 
ANCHOREDS_PROPERTYName of the property storing this part's anchoreds.- See Also:
 
- 
REFRESH_VISUAL_PROPERTYName of the property storing the refresh visual boolean property.- See Also:
 
 
- 
- 
Method Details- 
addChildAdds the given child to the list of this part's children.- Parameters:
- child- The- IVisualPartwhich is added to the list of this part's children.
 
- 
addChildAdds the given child to the list of this part's children at the specified index.- Parameters:
- child- The- IVisualPartwhich is added to the list of this part's children.
- index- The index at which the given- IVisualPartis inserted into this part's children list.
 
- 
addChildrenAdds the given children to the list of this part's children.- Parameters:
- children- The- IVisualParts which are added to the list of this part's children.
 
- 
addChildrenAdds the given children to the list of this part's children at the specified index.- Parameters:
- children- The- IVisualParts which are added to the list of this part's children.
- index- The index at which the given- IVisualParts are inserted into this part's children list.
 
- 
anchoragesUnmodifiablePropertyReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,String> anchoragesUnmodifiableProperty()Returns a read-only set-multimap property containing this part's anchorages and their corresponding roles.- See Also:
 
- 
anchoredsUnmodifiablePropertyReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>> anchoredsUnmodifiableProperty()Returns an unmodifiable read-only multiset property representing the anchoreds of thisIVisualPart.- See Also:
 
- 
attachAnchoredUsed by an anchoredIVisualPartto establish an anchorage-anchored relationship with this anchorageIVisualPart.Clients should never call this operation directly but instead add the anchorage to its anchored via the attachToAnchorage(IVisualPart)andattachToAnchorage(IVisualPart, String)operations, which will indirectly lead to a call here.- Parameters:
- anchored- An- IVisualPartto attach to this anchorage- IVisualPartas anchored.
- Noreference:
- Clients should call attachToAnchorage(IVisualPart),attachToAnchorage(IVisualPart, String)instead to establish an anchored-anchorage relationship.
 
- 
attachToAnchorageAttaches the givenIVisualPartto the given anchorage under the "default" role.- Parameters:
- anchorage- The anchorage- IVisualPartto attach this part to.
 
- 
attachToAnchorageAttaches the givenIVisualPartto the given anchorage under the given role.- Parameters:
- anchorage- The anchorage- IVisualPartto attach this part to.
- role- The role under which this- IVisualPartis attached to the given anchorage.- null.
 
- 
childrenUnmodifiablePropertyjavafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> childrenUnmodifiableProperty()Returns an unmodifiable read-only property containing the children of thisIVisualPart.- See Also:
 
- 
detachAnchoredUsed by an anchoredIVisualPartto unestablish an anchorage-anchored relationship with this anchorageIVisualPart.Clients should never call this operation directly but instead remove the anchorage from its anchored via the detachFromAnchorage(IVisualPart)ordetachFromAnchorage(IVisualPart, String)operations, which will indirectly lead to a call here.- Parameters:
- anchored- An- IVisualPart(currently attached as anchored to this anchorage- IVisualPart) to detach from this anchorage- IVisualPartas anchored.
- Noreference:
- Clients should call
              detachFromAnchorage(IVisualPart)ordetachFromAnchorage(IVisualPart, String)instead to unestablish an anchored-anchorage relationship.
 
- 
detachFromAnchorageDetaches thisIVisualPartfrom the given anchorageIVisualPartunder the 'default' role.- Parameters:
- anchorage- The anchorage- IVisualPartto detach this part from.
 
- 
detachFromAnchorageDetaches thisIVisualPartfrom the given anchorageIVisualPartunder the given role.- Parameters:
- anchorage- The anchorage- IVisualPartto detach this part from.
- role- The role under which the- IVisualPartcan be found in this part's anchorages.
 
- 
getAnchoragesUnmodifiableObservableSetMultimap<IVisualPart<? extends javafx.scene.Node>,String> getAnchoragesUnmodifiable()Returns an unmodifiableObservableSetMultimapof this part's anchorages and their corresponding roles.- Returns:
- A ObservableSetMultimapof this part's anchorages and their corresponding roles.
 
- 
getAnchoredsUnmodifiableObservableMultiset<IVisualPart<? extends javafx.scene.Node>> getAnchoredsUnmodifiable()Returns an unmodifiableObservableMultisetof this part's anchoreds.- Returns:
- An unmodifiable ObservableMultisetof this part's anchoreds.
 
- 
getBehaviorsMap<AdapterKey<? extends IBehavior>,IBehavior> getBehaviors()Returns aMapof this part's behaviors and their correspondingAdapterKeys.- Returns:
- A Mapof this part's behaviors and their correspondingAdapterKeys.
 
- 
getChildrenUnmodifiablejavafx.collections.ObservableList<IVisualPart<? extends javafx.scene.Node>> getChildrenUnmodifiable()Returns an unmodifiableObservableListof this part's children.- Returns:
- A ObservableListof this part's children.
 
- 
getHandlersMap<AdapterKey<? extends org.eclipse.gef.mvc.fx.handlers.IHandler>,org.eclipse.gef.mvc.fx.handlers.IHandler> getHandlers()Returns aMapof this part's handlers and their correspondingAdapterKeys.- Returns:
- A Mapof this part's handlers and their correspondingAdapterKeys.
 
- 
getParentIVisualPart<? extends javafx.scene.Node> getParent()Returns the parent of this part.- Returns:
- The parent of this part.
 
- 
getPoliciesMap<AdapterKey<? extends IPolicy>,IPolicy> getPolicies()Returns aMapof this part's policies and their correspondingAdapterKeys.- Returns:
- A Mapof this part's policies and their correspondingAdapterKeys.
 
- 
getRootIRootPart<? extends javafx.scene.Node> getRoot()Returns theIRootPart. This method should only be called internally or by helpers such as edit policies. The root can be used to get the viewer.- Returns:
- nullor the- IRootPart
 
- 
getViewerReturns theIViewerthisIVisualPartis bound to.- Returns:
- The IViewerthisIVisualPartis attached to.
 
- 
getVisualV getVisual()Returns this part's visual.- Returns:
- This part's visual.
 
- 
isRefreshVisualboolean isRefreshVisual()Returnstrueif this part is allowed to refresh its visualization based on its content. Otherwise returnsfalse.- Returns:
- trueif this part is allowed to refresh its visualization based on its content, otherwise- false.
 
- 
parentPropertyjavafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>> parentProperty()Returns a read-only property that refers to the parent of thisIVisualPart.- See Also:
 
- 
refreshVisualvoid refreshVisual()Refreshes this part's visualization based on this part's content.
- 
refreshVisualPropertyjavafx.beans.property.BooleanProperty refreshVisualProperty()A boolean property indicating whether thisIVisualPartshould refresh its visuals or not.- See Also:
 
- 
removeChildRemoves the givenIVisualPartfrom the list of this part's children.- Parameters:
- child- The- IVisualPartwhich is removed from the list of this part's children.
 
- 
removeChildrenRemoves the givenIVisualParts from the list of this part's children.- Parameters:
- children- The- IVisualParts which are removed from the list of this part's children.
 
- 
reorderChildSwaps the givenIVisualPartwith the part at the given index position within this part's list of children.- Parameters:
- child- The- IVisualPartwhich is reordered.
- index- The index to which the part is reordered.
 
- 
setParentUsed by a parentIVisualPartto establish/unestablish a parent-child relationship with this childIVisualPart.Clients should never call this operation directly but instead add the children to its parent via the addChild(IVisualPart),addChild(IVisualPart, int),addChildren(List), oraddChildren(List, int)or remove it via theremoveChild(IVisualPart)orremoveChildren(List)operations, which will indirectly lead to a call here.- Parameters:
- parent- The new parent- IVisualPartor- null.
- Noreference:
- Clients should use addChild(IVisualPart),addChild(IVisualPart, int),addChildren(List),addChildren(List, int),removeChild(IVisualPart), orremoveChildren(List)to establish/unestablish a parent-child relationship instead.
 
- 
setRefreshVisualvoid setRefreshVisual(boolean refreshVisual) Allows to temporarily turnrefreshVisual()into a no-op operation. This may for instance be used to disable visual updates that are initiated by the model (in case ofIContentParts) while interacting with theIVisualPart.- Parameters:
- refreshVisual- Whether- refreshVisual()should perform updates of the visual (- true) or behave like a no-op operation (- false).
 
 
-