Package org.eclipse.gef.mvc.fx.parts
Class AbstractVisualPart<V extends javafx.scene.Node>
java.lang.Object
org.eclipse.gef.mvc.fx.parts.AbstractVisualPart<V>
- Type Parameters:
V- The visual node used by thisAbstractVisualPart.
- All Implemented Interfaces:
IActivatable,IAdaptable,IAdaptable.Bound<IViewer>,IDisposable,IVisualPart<V>
- Direct Known Subclasses:
AbstractContentPart,AbstractFeedbackPart,AbstractHandlePart,LayeredRootPart
public abstract class AbstractVisualPart<V extends javafx.scene.Node>
extends Object
implements IVisualPart<V>
The
AbstractVisualPart is an abstract implementation of the
IVisualPart interface.-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<IViewer>javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,Object> 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.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. -
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable
IAdaptable.Bound<A extends IAdaptable>Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
IAdaptable.Bound.Impl<T extends IAdaptable> -
Field Summary
Fields inherited from interface org.eclipse.gef.common.activate.IActivatable
ACTIVE_PROPERTYFields inherited from interface org.eclipse.gef.common.adapt.IAdaptable
ADAPTERS_PROPERTYFields inherited from interface org.eclipse.gef.mvc.fx.parts.IVisualPart
ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidactivate()Activates thisIVisualPart(if it is not already active) by setting (and propagating) the new active state first and delegating todoActivate()afterwards.protected voidActivates the adapters registered at thisAbstractVisualPart.protected voidActivates the children of thisAbstractVisualPart.javafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<IViewer>javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,Object> voidaddChild(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.final voidDeactivates thisIVisualPart(if it is active) by delegating todoDeactivate()first and setting (and propagating) the new active state afterwards.protected voidDeactivates the adapters registered at thisAbstractVisualPart.protected voidDeactivates the children of thisAbstractVisualPart.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.protected IViewerdetermineViewer(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.voiddispose()protected voidActivates thisAbstractVisualPart, which activates its children and adapters.protected voiddoAddChildVisual(IVisualPart<? extends javafx.scene.Node> child, int index) Performs the addition of the child's visual to thisIVisualPart's visual.protected voiddoAttachToAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Attaches this part's visual to the visual of the given anchorage.protected abstract VCreates this part's visual.protected voidDeactivates thisAbstractVisualPart, which deactivates its children and adapters.protected voiddoDetachFromAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Detaches this part's visual from the visual of the given anchorage.protected abstract voiddoRefreshVisual(V visual) Refreshes this part's visualization based on this part's content.protected voiddoRemoveChildVisual(IVisualPart<? extends javafx.scene.Node> child, int index) Removes the child's visual from thisIVisualPart's visual.Gets the value of the property adaptable.<T> TgetAdapter(TypeToken<T> key) <T> TgetAdapter(Class<T> classKey) <T> TgetAdapter(AdapterKey<T> key) <T> AdapterKey<T>getAdapterKey(T adapter) javafx.collections.ObservableMap<AdapterKey<?>,Object> Gets the value of the property adapters.<T> Map<AdapterKey<? extends T>,T> getAdapters(TypeToken<? super T> key) <T> Map<AdapterKey<? extends T>,T> getAdapters(Class<? super T> classKey) ObservableSetMultimap<IVisualPart<? extends javafx.scene.Node>,String> Gets the value of the property anchoragesUnmodifiable.ObservableMultiset<IVisualPart<? extends javafx.scene.Node>>Gets the value of the property anchoredsUnmodifiable.Map<AdapterKey<? extends IBehavior>,IBehavior> Returns aMapof this part's behaviors and their correspondingAdapterKeys.javafx.collections.ObservableList<IVisualPart<? extends javafx.scene.Node>>Gets the value of the property childrenUnmodifiable.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>Gets the value of the property parent.Map<AdapterKey<? extends IPolicy>,IPolicy> Returns aMapof this part's policies and their correspondingAdapterKeys.IRootPart<? extends javafx.scene.Node>getRoot()Returns theIRootPart.Returns this part's visual.booleanisActive()booleanGets the value of the property refreshVisual.javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>>Returns a read-only property that refers to the parent of thisIVisualPart.final voidRefreshes thisIVisualPart's visuals.javafx.beans.property.BooleanPropertyA boolean property indicating whether thisIVisualPartshould refresh its visuals or not.protected voidCalled when a link to theIVieweris obtained.protected voidregisterAtVisualPartMap(IViewer viewer, V visual) Registers this part for the given visual in the visual-part-map of the givenIViewer.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.voidsetAdaptable(IViewer viewer) Sets the value of the property adaptable.<T> voidsetAdapter(TypeToken<T> adapterType, T adapter) <T> voidsetAdapter(TypeToken<T> adapterType, T adapter, String role) <T> voidsetAdapter(T adapter) <T> voidsetAdapter(T adapter, String role) voidsetParent(IVisualPart<? extends javafx.scene.Node> newParent) Sets the parentIVisualPart.voidsetRefreshVisual(boolean isRefreshVisual) Sets the value of the property refreshVisual.protected voidunregister(IViewer viewer) Called when the link to theIVieweris lost.protected voidunregisterFromVisualPartMap(IViewer viewer, V visual) Removes the given visual from the visual-part-map of the given viewer.<T> voidunsetAdapter(T adapter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.gef.mvc.fx.parts.IVisualPart
getViewer
-
Property Details
-
active
public javafx.beans.property.ReadOnlyBooleanProperty activeProperty- Specified by:
activePropertyin interfaceIActivatable- See Also:
-
adaptable
- Specified by:
adaptablePropertyin interfaceIAdaptable.Bound<V extends javafx.scene.Node>- See Also:
-
adapters
- Specified by:
adaptersPropertyin interfaceIAdaptable- See Also:
-
anchoragesUnmodifiable
public ReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,String> anchoragesUnmodifiableProperty- Specified by:
anchoragesUnmodifiablePropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A read-only set-multimap property named
IVisualPart.ANCHORAGES_PROPERTY. - See Also:
-
anchoredsUnmodifiable
public ReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>> anchoredsUnmodifiableProperty- Specified by:
anchoredsUnmodifiablePropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- An unmodifiable read-only multiset property named
IVisualPart.ANCHOREDS_PROPERTY. - See Also:
-
childrenUnmodifiable
public javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> childrenUnmodifiableProperty- Specified by:
childrenUnmodifiablePropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- An unmodifiable read-only property named
IVisualPart.CHILDREN_PROPERTY. - See Also:
-
parent
public javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>> parentProperty- Specified by:
parentPropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A read-only property named
IVisualPart.PARENT_PROPERTY. - See Also:
-
refreshVisual
public javafx.beans.property.BooleanProperty refreshVisualProperty- Specified by:
refreshVisualPropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A boolean property named
IVisualPart.REFRESH_VISUAL_PROPERTY. - See Also:
-
-
Constructor Details
-
AbstractVisualPart
public AbstractVisualPart()
-
-
Method Details
-
activate
public final void activate()Activates thisIVisualPart(if it is not already active) by setting (and propagating) the new active state first and delegating todoActivate()afterwards. During the call todoActivate(),isActive()will thus already returntrue. If theIVisualPartis already active, this operation will be a no-op.- Specified by:
activatein interfaceIActivatable- See Also:
-
activateAdapters
protected void activateAdapters()Activates the adapters registered at thisAbstractVisualPart. -
activateChildren
protected void activateChildren()Activates the children of thisAbstractVisualPart. -
activeProperty
public javafx.beans.property.ReadOnlyBooleanProperty activeProperty()- Specified by:
activePropertyin interfaceIActivatable- See Also:
-
adaptableProperty
- Specified by:
adaptablePropertyin interfaceIAdaptable.Bound<V extends javafx.scene.Node>- See Also:
-
adaptersProperty
- Specified by:
adaptersPropertyin interfaceIAdaptable- See Also:
-
addChild
Description copied from interface:IVisualPartAdds the given child to the list of this part's children.- Specified by:
addChildin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
child- TheIVisualPartwhich is added to the list of this part's children.
-
addChild
Description copied from interface:IVisualPartAdds the given child to the list of this part's children at the specified index.- Specified by:
addChildin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
child- TheIVisualPartwhich is added to the list of this part's children.index- The index at which the givenIVisualPartis inserted into this part's children list.
-
addChildren
Description copied from interface:IVisualPartAdds the given children to the list of this part's children.- Specified by:
addChildrenin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
children- TheIVisualParts which are added to the list of this part's children.
-
addChildren
public void addChildren(List<? extends IVisualPart<? extends javafx.scene.Node>> children, int index) Description copied from interface:IVisualPartAdds the given children to the list of this part's children at the specified index.- Specified by:
addChildrenin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
children- TheIVisualParts which are added to the list of this part's children.index- The index at which the givenIVisualParts are inserted into this part's children list.
-
anchoragesUnmodifiableProperty
public ReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,String> anchoragesUnmodifiableProperty()Description copied from interface:IVisualPartReturns a read-only set-multimap property containing this part's anchorages and their corresponding roles.- Specified by:
anchoragesUnmodifiablePropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A read-only set-multimap property named
IVisualPart.ANCHORAGES_PROPERTY. - See Also:
-
anchoredsUnmodifiableProperty
public ReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>> anchoredsUnmodifiableProperty()Description copied from interface:IVisualPartReturns an unmodifiable read-only multiset property representing the anchoreds of thisIVisualPart.- Specified by:
anchoredsUnmodifiablePropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- An unmodifiable read-only multiset property named
IVisualPart.ANCHOREDS_PROPERTY. - See Also:
-
attachAnchored
Description copied from interface:IVisualPartUsed 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
IVisualPart.attachToAnchorage(IVisualPart)andIVisualPart.attachToAnchorage(IVisualPart, String)operations, which will indirectly lead to a call here.- Specified by:
attachAnchoredin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
anchored- AnIVisualPartto attach to this anchorageIVisualPartas anchored.
-
attachToAnchorage
Description copied from interface:IVisualPartAttaches the givenIVisualPartto the given anchorage under the "default" role.- Specified by:
attachToAnchoragein interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
anchorage- The anchorageIVisualPartto attach this part to.
-
attachToAnchorage
Description copied from interface:IVisualPartAttaches the givenIVisualPartto the given anchorage under the given role.- Specified by:
attachToAnchoragein interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
anchorage- The anchorageIVisualPartto attach this part to.role- The role under which thisIVisualPartis attached to the given anchorage.null.
-
childrenUnmodifiableProperty
public javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> childrenUnmodifiableProperty()Description copied from interface:IVisualPartReturns an unmodifiable read-only property containing the children of thisIVisualPart.- Specified by:
childrenUnmodifiablePropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- An unmodifiable read-only property named
IVisualPart.CHILDREN_PROPERTY. - See Also:
-
deactivate
public final void deactivate()Deactivates thisIVisualPart(if it is active) by delegating todoDeactivate()first and setting (and propagating) the new active state afterwards. During the call todoDeactivate(),isActive()will thus still returntrue. If theIVisualPartis not active, this operation will be a no-op.- Specified by:
deactivatein interfaceIActivatable- See Also:
-
deactivateAdapters
protected void deactivateAdapters()Deactivates the adapters registered at thisAbstractVisualPart. -
deactivateChildren
protected void deactivateChildren()Deactivates the children of thisAbstractVisualPart. -
detachAnchored
Description copied from interface:IVisualPartUsed 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
IVisualPart.detachFromAnchorage(IVisualPart)orIVisualPart.detachFromAnchorage(IVisualPart, String)operations, which will indirectly lead to a call here.- Specified by:
detachAnchoredin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
anchored- AnIVisualPart(currently attached as anchored to this anchorageIVisualPart) to detach from this anchorageIVisualPartas anchored.
-
detachFromAnchorage
Description copied from interface:IVisualPartDetaches thisIVisualPartfrom the given anchorageIVisualPartunder the 'default' role.- Specified by:
detachFromAnchoragein interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
anchorage- The anchorageIVisualPartto detach this part from.
-
detachFromAnchorage
Description copied from interface:IVisualPartDetaches thisIVisualPartfrom the given anchorageIVisualPartunder the given role.- Specified by:
detachFromAnchoragein interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
anchorage- The anchorageIVisualPartto detach this part from.role- The role under which theIVisualPartcan be found in this part's anchorages.
-
determineViewer
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.- Parameters:
parent- The parent to obtain the viewer from.anchoreds- The anchoreds to alternatively obtain the viewer from.- Returns:
- The viewer, if it could be determined via the parent or any of the anchoreds.
-
dispose
public void dispose()- Specified by:
disposein interfaceIDisposable
-
doActivate
protected void doActivate()Activates thisAbstractVisualPart, which activates its children and adapters. -
doAddChildVisual
Performs the addition of the child's visual to thisIVisualPart's visual.- Parameters:
child- TheIVisualPartbeing addedindex- The child's position- See Also:
-
doAttachToAnchorageVisual
protected void doAttachToAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Attaches this part's visual to the visual of the given anchorage.- Parameters:
anchorage- The anchorageIVisualPart.role- The anchorage role.
-
doCreateVisual
Creates this part's visual.- Returns:
- This part's visual.
-
doDeactivate
protected void doDeactivate()Deactivates thisAbstractVisualPart, which deactivates its children and adapters. -
doDetachFromAnchorageVisual
protected void doDetachFromAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Detaches this part's visual from the visual of the given anchorage.- Parameters:
anchorage- The anchorageIVisualPart.role- The anchorage role.
-
doRefreshVisual
Refreshes this part's visualization based on this part's content.- Parameters:
visual- This part's visual.
-
doRemoveChildVisual
Removes the child's visual from thisIVisualPart's visual.- Parameters:
child- The childIVisualPart.index- The index of the child whose visual is to be removed.
-
getAdaptable
Gets the value of the property adaptable.- Specified by:
getAdaptablein interfaceIAdaptable.Bound<V extends javafx.scene.Node>- Property description:
-
getAdapter
- Specified by:
getAdapterin interfaceIAdaptable
-
getAdapter
- Specified by:
getAdapterin interfaceIAdaptable
-
getAdapter
- Specified by:
getAdapterin interfaceIAdaptable
-
getAdapterKey
- Specified by:
getAdapterKeyin interfaceIAdaptable
-
getAdapters
Gets the value of the property adapters.- Specified by:
getAdaptersin interfaceIAdaptable- Property description:
-
getAdapters
- Specified by:
getAdaptersin interfaceIAdaptable
-
getAdapters
- Specified by:
getAdaptersin interfaceIAdaptable
-
getAnchoragesUnmodifiable
public ObservableSetMultimap<IVisualPart<? extends javafx.scene.Node>,String> getAnchoragesUnmodifiable()Gets the value of the property anchoragesUnmodifiable.- Specified by:
getAnchoragesUnmodifiablein interfaceIVisualPart<V extends javafx.scene.Node>- Property description:
- Returns:
- A
ObservableSetMultimapof this part's anchorages and their corresponding roles.
-
getAnchoredsUnmodifiable
Gets the value of the property anchoredsUnmodifiable.- Specified by:
getAnchoredsUnmodifiablein interfaceIVisualPart<V extends javafx.scene.Node>- Property description:
- Returns:
- An unmodifiable
ObservableMultisetof this part's anchoreds.
-
getBehaviors
Description copied from interface:IVisualPartReturns aMapof this part's behaviors and their correspondingAdapterKeys.- Specified by:
getBehaviorsin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A
Mapof this part's behaviors and their correspondingAdapterKeys.
-
getChildrenUnmodifiable
public javafx.collections.ObservableList<IVisualPart<? extends javafx.scene.Node>> getChildrenUnmodifiable()Gets the value of the property childrenUnmodifiable.- Specified by:
getChildrenUnmodifiablein interfaceIVisualPart<V extends javafx.scene.Node>- Property description:
- Returns:
- A
ObservableListof this part's children.
-
getHandlers
public Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.handlers.IHandler>,org.eclipse.gef.mvc.fx.handlers.IHandler> getHandlers()Description copied from interface:IVisualPartReturns aMapof this part's handlers and their correspondingAdapterKeys.- Specified by:
getHandlersin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A
Mapof this part's handlers and their correspondingAdapterKeys.
-
getParent
Gets the value of the property parent.- Specified by:
getParentin interfaceIVisualPart<V extends javafx.scene.Node>- Property description:
- Returns:
- The parent of this part.
-
getPolicies
Description copied from interface:IVisualPartReturns aMapof this part's policies and their correspondingAdapterKeys.- Specified by:
getPoliciesin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A
Mapof this part's policies and their correspondingAdapterKeys.
-
getRoot
Description copied from interface:IVisualPartReturns theIRootPart. This method should only be called internally or by helpers such as edit policies. The root can be used to get the viewer.- Specified by:
getRootin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
nullor theIRootPart
-
getVisual
Description copied from interface:IVisualPartReturns this part's visual.- Specified by:
getVisualin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- This part's visual.
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceIActivatable- Returns:
trueif thisIVisualPartis active.
-
isRefreshVisual
public boolean isRefreshVisual()Gets the value of the property refreshVisual.- Specified by:
isRefreshVisualin interfaceIVisualPart<V extends javafx.scene.Node>- Property description:
- Returns:
trueif this part is allowed to refresh its visualization based on its content, otherwisefalse.
-
parentProperty
public javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>> parentProperty()Description copied from interface:IVisualPartReturns a read-only property that refers to the parent of thisIVisualPart.- Specified by:
parentPropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A read-only property named
IVisualPart.PARENT_PROPERTY. - See Also:
-
refreshVisual
public final void refreshVisual()Refreshes thisIVisualPart's visuals. Delegates todoRefreshVisual(Node)in caseisRefreshVisual()is not set tofalse.- Specified by:
refreshVisualin interfaceIVisualPart<V extends javafx.scene.Node>
-
refreshVisualProperty
public javafx.beans.property.BooleanProperty refreshVisualProperty()Description copied from interface:IVisualPartA boolean property indicating whether thisIVisualPartshould refresh its visuals or not.- Specified by:
refreshVisualPropertyin interfaceIVisualPart<V extends javafx.scene.Node>- Returns:
- A boolean property named
IVisualPart.REFRESH_VISUAL_PROPERTY. - See Also:
-
register
Called when a link to theIVieweris obtained. Registers thisIVisualPartfor its "main" visual (i.e. the one returned bygetVisual()) at theIViewer.getVisualPartMap()of the givenIViewer. To simplify matters, thisIVisualPartonly has to register itself for its "main" visual, i.e. if the "main" visual contains a number of children visuals, it does not need to register itself for those children visuals. Therefore, if the visualization changes dynamically, the registration at the visual-part-map does not need to be updated. Consequently, when looking up anIVisualPartfor a given visual in the visual-part-map, it is required to walk up the visual hierarchy until a registered visual is found.- Parameters:
viewer- TheIViewerto register at.
-
registerAtVisualPartMap
Registers this part for the given visual in the visual-part-map of the givenIViewer.- Parameters:
viewer- TheIViewerof which the visual-part-map is extended.visual- The visual for which this part is registered in the viewer's visual-part-map.
-
removeChild
Description copied from interface:IVisualPartRemoves the givenIVisualPartfrom the list of this part's children.- Specified by:
removeChildin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
child- TheIVisualPartwhich is removed from the list of this part's children.
-
removeChildren
Description copied from interface:IVisualPartRemoves the givenIVisualParts from the list of this part's children.- Specified by:
removeChildrenin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
children- TheIVisualParts which are removed from the list of this part's children.
-
reorderChild
Description copied from interface:IVisualPartSwaps the givenIVisualPartwith the part at the given index position within this part's list of children.- Specified by:
reorderChildin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
child- TheIVisualPartwhich is reordered.index- The index to which the part is reordered.
-
setAdaptable
Sets the value of the property adaptable.- Specified by:
setAdaptablein interfaceIAdaptable.Bound<V extends javafx.scene.Node>- Property description:
-
setAdapter
public <T> void setAdapter(T adapter) - Specified by:
setAdapterin interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapterin interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapterin interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapterin interfaceIAdaptable
-
setParent
Sets the parentIVisualPart.- Specified by:
setParentin interfaceIVisualPart<V extends javafx.scene.Node>- Parameters:
newParent- The new parentIVisualPartornull.
-
setRefreshVisual
public void setRefreshVisual(boolean isRefreshVisual) Sets the value of the property refreshVisual.- Specified by:
setRefreshVisualin interfaceIVisualPart<V extends javafx.scene.Node>- Property description:
- Parameters:
isRefreshVisual- WhetherIVisualPart.refreshVisual()should perform updates of the visual (true) or behave like a no-op operation (false).
-
unregister
Called when the link to theIVieweris lost. Unregisters thisIVisualPartfor its "main" visual (i.e. the one returned bygetVisual()) from theIViewer.getVisualPartMap()of the givenIViewer. To simplify matters, thisIVisualPartonly has to unregister itself for its "main" visual, i.e. if the "main" visual contains a number of children visuals, it does not need to unregister itself for those children visuals. Therefore, if the visualization changes dynamically, the registration at the visual-part-map does not need to be updated. Consequently, when looking up anIVisualPartfor a given visual in the visual-part-map, it is required to walk up the visual hierarchy until a registered visual is found.- Parameters:
viewer- TheIViewerto unregister from.
-
unregisterFromVisualPartMap
Removes the given visual from the visual-part-map of the given viewer.- Parameters:
viewer- TheIViewerof which the visual-part-map is changed.visual- The visual which is removed from the visual-part-map.
-
unsetAdapter
public <T> void unsetAdapter(T adapter) - Specified by:
unsetAdapterin interfaceIAdaptable
-