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
TypePropertyDescriptionjavafx.beans.property.ReadOnlyBooleanProperty
javafx.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.BooleanProperty
A boolean property indicating whether thisIVisualPart
should 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_PROPERTY
Fields inherited from interface org.eclipse.gef.common.adapt.IAdaptable
ADAPTERS_PROPERTY
Fields inherited from interface org.eclipse.gef.mvc.fx.parts.IVisualPart
ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
activate()
Activates thisIVisualPart
(if it is not already active) by setting (and propagating) the new active state first and delegating todoActivate()
afterwards.protected void
Activates the adapters registered at thisAbstractVisualPart
.protected void
Activates the children of thisAbstractVisualPart
.javafx.beans.property.ReadOnlyBooleanProperty
javafx.beans.property.ReadOnlyObjectProperty<IViewer>
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,
Object> void
addChild
(IVisualPart<? extends javafx.scene.Node> child) Adds the given child to the list of this part's children.void
addChild
(IVisualPart<? extends javafx.scene.Node> child, int index) Adds the given child to the list of this part's children at the specified index.void
addChildren
(List<? extends IVisualPart<? extends javafx.scene.Node>> children) Adds the given children to the list of this part's children.void
addChildren
(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
.void
attachAnchored
(IVisualPart<? extends javafx.scene.Node> anchored) Used by an anchoredIVisualPart
to establish an anchorage-anchored relationship with this anchorageIVisualPart
.void
attachToAnchorage
(IVisualPart<? extends javafx.scene.Node> anchorage) Attaches the givenIVisualPart
to the given anchorage under the "default" role.void
attachToAnchorage
(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Attaches the givenIVisualPart
to 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 void
Deactivates thisIVisualPart
(if it is active) by delegating todoDeactivate()
first and setting (and propagating) the new active state afterwards.protected void
Deactivates the adapters registered at thisAbstractVisualPart
.protected void
Deactivates the children of thisAbstractVisualPart
.void
detachAnchored
(IVisualPart<? extends javafx.scene.Node> anchored) Used by an anchoredIVisualPart
to unestablish an anchorage-anchored relationship with this anchorageIVisualPart
.void
detachFromAnchorage
(IVisualPart<? extends javafx.scene.Node> anchorage) Detaches thisIVisualPart
from the given anchorageIVisualPart
under the 'default' role.void
detachFromAnchorage
(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Detaches thisIVisualPart
from the given anchorageIVisualPart
under the given role.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.void
dispose()
protected void
Activates thisAbstractVisualPart
, which activates its children and adapters.protected void
doAddChildVisual
(IVisualPart<? extends javafx.scene.Node> child, int index) Performs the addition of the child's visual to thisIVisualPart
's visual.protected void
doAttachToAnchorageVisual
(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Attaches this part's visual to the visual of the given anchorage.protected abstract V
Creates this part's visual.protected void
Deactivates thisAbstractVisualPart
, which deactivates its children and adapters.protected void
doDetachFromAnchorageVisual
(IVisualPart<? extends javafx.scene.Node> anchorage, String role) Detaches this part's visual from the visual of the given anchorage.protected abstract void
doRefreshVisual
(V 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 thisIVisualPart
's visual.Gets the value of the property adaptable.<T> T
getAdapter
(TypeToken<T> key) <T> T
getAdapter
(Class<T> classKey) <T> T
getAdapter
(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 aMap
of this part's behaviors and their correspondingAdapterKey
s.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 aMap
of this part's handlers and their correspondingAdapterKey
s.IVisualPart<? extends javafx.scene.Node>
Gets the value of the property parent.Map<AdapterKey<? extends IPolicy>,
IPolicy> Returns aMap
of this part's policies and their correspondingAdapterKey
s.IRootPart<? extends javafx.scene.Node>
getRoot()
Returns theIRootPart
.Returns this part's visual.boolean
isActive()
boolean
Gets 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 void
Refreshes thisIVisualPart
's visuals.javafx.beans.property.BooleanProperty
A boolean property indicating whether thisIVisualPart
should refresh its visuals or not.protected void
Called when a link to theIViewer
is obtained.protected void
registerAtVisualPartMap
(IViewer viewer, V visual) Registers this part for the given visual in the visual-part-map of the givenIViewer
.void
removeChild
(IVisualPart<? extends javafx.scene.Node> child) Removes the givenIVisualPart
from the list of this part's children.void
removeChildren
(List<? extends IVisualPart<? extends javafx.scene.Node>> children) Removes the givenIVisualPart
s from the list of this part's children.void
reorderChild
(IVisualPart<? extends javafx.scene.Node> child, int index) Swaps the givenIVisualPart
with the part at the given index position within this part's list of children.void
setAdaptable
(IViewer viewer) Sets the value of the property adaptable.<T> void
setAdapter
(TypeToken<T> adapterType, T adapter) <T> void
setAdapter
(TypeToken<T> adapterType, T adapter, String role) <T> void
setAdapter
(T adapter) <T> void
setAdapter
(T adapter, String role) void
setParent
(IVisualPart<? extends javafx.scene.Node> newParent) Sets the parentIVisualPart
.void
setRefreshVisual
(boolean isRefreshVisual) Sets the value of the property refreshVisual.protected void
unregister
(IViewer viewer) Called when the link to theIViewer
is lost.protected void
unregisterFromVisualPartMap
(IViewer viewer, V visual) Removes the given visual from the visual-part-map of the given viewer.<T> void
unsetAdapter
(T adapter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.gef.mvc.fx.parts.IVisualPart
getViewer
-
Property Details
-
active
public javafx.beans.property.ReadOnlyBooleanProperty activeProperty- Specified by:
activeProperty
in interfaceIActivatable
- See Also:
-
adaptable
- Specified by:
adaptableProperty
in interfaceIAdaptable.Bound<V extends javafx.scene.Node>
- See Also:
-
adapters
- Specified by:
adaptersProperty
in interfaceIAdaptable
- See Also:
-
anchoragesUnmodifiable
public ReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,String> anchoragesUnmodifiableProperty- Specified by:
anchoragesUnmodifiableProperty
in 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:
anchoredsUnmodifiableProperty
in 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:
childrenUnmodifiableProperty
in 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:
parentProperty
in 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:
refreshVisualProperty
in 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 theIVisualPart
is already active, this operation will be a no-op.- Specified by:
activate
in 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:
activeProperty
in interfaceIActivatable
- See Also:
-
adaptableProperty
- Specified by:
adaptableProperty
in interfaceIAdaptable.Bound<V extends javafx.scene.Node>
- See Also:
-
adaptersProperty
- Specified by:
adaptersProperty
in interfaceIAdaptable
- See Also:
-
addChild
Description copied from interface:IVisualPart
Adds the given child to the list of this part's children.- Specified by:
addChild
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
child
- TheIVisualPart
which is added to the list of this part's children.
-
addChild
Description copied from interface:IVisualPart
Adds the given child to the list of this part's children at the specified index.- Specified by:
addChild
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
child
- TheIVisualPart
which is added to the list of this part's children.index
- The index at which the givenIVisualPart
is inserted into this part's children list.
-
addChildren
Description copied from interface:IVisualPart
Adds the given children to the list of this part's children.- Specified by:
addChildren
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
children
- TheIVisualPart
s 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:IVisualPart
Adds the given children to the list of this part's children at the specified index.- Specified by:
addChildren
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
children
- TheIVisualPart
s which are added to the list of this part's children.index
- The index at which the givenIVisualPart
s are inserted into this part's children list.
-
anchoragesUnmodifiableProperty
public ReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,String> anchoragesUnmodifiableProperty()Description copied from interface:IVisualPart
Returns a read-only set-multimap property containing this part's anchorages and their corresponding roles.- Specified by:
anchoragesUnmodifiableProperty
in 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:IVisualPart
Returns an unmodifiable read-only multiset property representing the anchoreds of thisIVisualPart
.- Specified by:
anchoredsUnmodifiableProperty
in interfaceIVisualPart<V extends javafx.scene.Node>
- Returns:
- An unmodifiable read-only multiset property named
IVisualPart.ANCHOREDS_PROPERTY
. - See Also:
-
attachAnchored
Description copied from interface:IVisualPart
Used by an anchoredIVisualPart
to 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:
attachAnchored
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
anchored
- AnIVisualPart
to attach to this anchorageIVisualPart
as anchored.
-
attachToAnchorage
Description copied from interface:IVisualPart
Attaches the givenIVisualPart
to the given anchorage under the "default" role.- Specified by:
attachToAnchorage
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
anchorage
- The anchorageIVisualPart
to attach this part to.
-
attachToAnchorage
Description copied from interface:IVisualPart
Attaches the givenIVisualPart
to the given anchorage under the given role.- Specified by:
attachToAnchorage
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
anchorage
- The anchorageIVisualPart
to attach this part to.role
- The role under which thisIVisualPart
is attached to the given anchorage.null
.
-
childrenUnmodifiableProperty
public javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> childrenUnmodifiableProperty()Description copied from interface:IVisualPart
Returns an unmodifiable read-only property containing the children of thisIVisualPart
.- Specified by:
childrenUnmodifiableProperty
in 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 theIVisualPart
is not active, this operation will be a no-op.- Specified by:
deactivate
in 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:IVisualPart
Used by an anchoredIVisualPart
to 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:
detachAnchored
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
anchored
- AnIVisualPart
(currently attached as anchored to this anchorageIVisualPart
) to detach from this anchorageIVisualPart
as anchored.
-
detachFromAnchorage
Description copied from interface:IVisualPart
Detaches thisIVisualPart
from the given anchorageIVisualPart
under the 'default' role.- Specified by:
detachFromAnchorage
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
anchorage
- The anchorageIVisualPart
to detach this part from.
-
detachFromAnchorage
Description copied from interface:IVisualPart
Detaches thisIVisualPart
from the given anchorageIVisualPart
under the given role.- Specified by:
detachFromAnchorage
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
anchorage
- The anchorageIVisualPart
to detach this part from.role
- The role under which theIVisualPart
can 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:
dispose
in 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
- TheIVisualPart
being 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:
getAdaptable
in interfaceIAdaptable.Bound<V extends javafx.scene.Node>
- Property description:
-
getAdapter
- Specified by:
getAdapter
in interfaceIAdaptable
-
getAdapter
- Specified by:
getAdapter
in interfaceIAdaptable
-
getAdapter
- Specified by:
getAdapter
in interfaceIAdaptable
-
getAdapterKey
- Specified by:
getAdapterKey
in interfaceIAdaptable
-
getAdapters
Gets the value of the property adapters.- Specified by:
getAdapters
in interfaceIAdaptable
- Property description:
-
getAdapters
- Specified by:
getAdapters
in interfaceIAdaptable
-
getAdapters
- Specified by:
getAdapters
in interfaceIAdaptable
-
getAnchoragesUnmodifiable
public ObservableSetMultimap<IVisualPart<? extends javafx.scene.Node>,String> getAnchoragesUnmodifiable()Gets the value of the property anchoragesUnmodifiable.- Specified by:
getAnchoragesUnmodifiable
in interfaceIVisualPart<V extends javafx.scene.Node>
- Property description:
- Returns:
- A
ObservableSetMultimap
of this part's anchorages and their corresponding roles.
-
getAnchoredsUnmodifiable
Gets the value of the property anchoredsUnmodifiable.- Specified by:
getAnchoredsUnmodifiable
in interfaceIVisualPart<V extends javafx.scene.Node>
- Property description:
- Returns:
- An unmodifiable
ObservableMultiset
of this part's anchoreds.
-
getBehaviors
Description copied from interface:IVisualPart
Returns aMap
of this part's behaviors and their correspondingAdapterKey
s.- Specified by:
getBehaviors
in interfaceIVisualPart<V extends javafx.scene.Node>
- Returns:
- A
Map
of this part's behaviors and their correspondingAdapterKey
s.
-
getChildrenUnmodifiable
public javafx.collections.ObservableList<IVisualPart<? extends javafx.scene.Node>> getChildrenUnmodifiable()Gets the value of the property childrenUnmodifiable.- Specified by:
getChildrenUnmodifiable
in interfaceIVisualPart<V extends javafx.scene.Node>
- Property description:
- Returns:
- A
ObservableList
of 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:IVisualPart
Returns aMap
of this part's handlers and their correspondingAdapterKey
s.- Specified by:
getHandlers
in interfaceIVisualPart<V extends javafx.scene.Node>
- Returns:
- A
Map
of this part's handlers and their correspondingAdapterKey
s.
-
getParent
Gets the value of the property parent.- Specified by:
getParent
in interfaceIVisualPart<V extends javafx.scene.Node>
- Property description:
- Returns:
- The parent of this part.
-
getPolicies
Description copied from interface:IVisualPart
Returns aMap
of this part's policies and their correspondingAdapterKey
s.- Specified by:
getPolicies
in interfaceIVisualPart<V extends javafx.scene.Node>
- Returns:
- A
Map
of this part's policies and their correspondingAdapterKey
s.
-
getRoot
Description copied from interface:IVisualPart
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.- Specified by:
getRoot
in interfaceIVisualPart<V extends javafx.scene.Node>
- Returns:
null
or theIRootPart
-
getVisual
Description copied from interface:IVisualPart
Returns this part's visual.- Specified by:
getVisual
in interfaceIVisualPart<V extends javafx.scene.Node>
- Returns:
- This part's visual.
-
isActive
public boolean isActive()- Specified by:
isActive
in interfaceIActivatable
- Returns:
true
if thisIVisualPart
is active.
-
isRefreshVisual
public boolean isRefreshVisual()Gets the value of the property refreshVisual.- Specified by:
isRefreshVisual
in interfaceIVisualPart<V extends javafx.scene.Node>
- Property description:
- Returns:
true
if 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:IVisualPart
Returns a read-only property that refers to the parent of thisIVisualPart
.- Specified by:
parentProperty
in 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:
refreshVisual
in interfaceIVisualPart<V extends javafx.scene.Node>
-
refreshVisualProperty
public javafx.beans.property.BooleanProperty refreshVisualProperty()Description copied from interface:IVisualPart
A boolean property indicating whether thisIVisualPart
should refresh its visuals or not.- Specified by:
refreshVisualProperty
in interfaceIVisualPart<V extends javafx.scene.Node>
- Returns:
- A boolean property named
IVisualPart.REFRESH_VISUAL_PROPERTY
. - See Also:
-
register
Called when a link to theIViewer
is obtained. Registers thisIVisualPart
for its "main" visual (i.e. the one returned bygetVisual()
) at theIViewer.getVisualPartMap()
of the givenIViewer
. To simplify matters, thisIVisualPart
only 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 anIVisualPart
for 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
- TheIViewer
to register at.
-
registerAtVisualPartMap
Registers this part for the given visual in the visual-part-map of the givenIViewer
.- Parameters:
viewer
- TheIViewer
of 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:IVisualPart
Removes the givenIVisualPart
from the list of this part's children.- Specified by:
removeChild
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
child
- TheIVisualPart
which is removed from the list of this part's children.
-
removeChildren
Description copied from interface:IVisualPart
Removes the givenIVisualPart
s from the list of this part's children.- Specified by:
removeChildren
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
children
- TheIVisualPart
s which are removed from the list of this part's children.
-
reorderChild
Description copied from interface:IVisualPart
Swaps the givenIVisualPart
with the part at the given index position within this part's list of children.- Specified by:
reorderChild
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
child
- TheIVisualPart
which is reordered.index
- The index to which the part is reordered.
-
setAdaptable
Sets the value of the property adaptable.- Specified by:
setAdaptable
in interfaceIAdaptable.Bound<V extends javafx.scene.Node>
- Property description:
-
setAdapter
public <T> void setAdapter(T adapter) - Specified by:
setAdapter
in interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapter
in interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapter
in interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapter
in interfaceIAdaptable
-
setParent
Sets the parentIVisualPart
.- Specified by:
setParent
in interfaceIVisualPart<V extends javafx.scene.Node>
- Parameters:
newParent
- The new parentIVisualPart
ornull
.
-
setRefreshVisual
public void setRefreshVisual(boolean isRefreshVisual) Sets the value of the property refreshVisual.- Specified by:
setRefreshVisual
in 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 theIViewer
is lost. Unregisters thisIVisualPart
for its "main" visual (i.e. the one returned bygetVisual()
) from theIViewer.getVisualPartMap()
of the givenIViewer
. To simplify matters, thisIVisualPart
only 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 anIVisualPart
for 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
- TheIViewer
to unregister from.
-
unregisterFromVisualPartMap
Removes the given visual from the visual-part-map of the given viewer.- Parameters:
viewer
- TheIViewer
of 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:
unsetAdapter
in interfaceIAdaptable
-