V - The visual node used by this AbstractVisualPart.public abstract class AbstractVisualPart<V extends javafx.scene.Node> extends java.lang.Object implements IVisualPart<V>
AbstractVisualPart is an abstract implementation of the
IVisualPart interface.| Type | Property and Description |
|---|---|
javafx.beans.property.ReadOnlyBooleanProperty |
active |
javafx.beans.property.ReadOnlyObjectProperty<IViewer> |
adaptable |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
adapters |
ReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,java.lang.String> |
anchoragesUnmodifiable
Returns a read-only set-multimap property containing this part's
anchorages and their corresponding roles.
|
ReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>> |
anchoredsUnmodifiable
Returns an unmodifiable read-only multiset property representing the
anchoreds of this
IVisualPart. |
javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> |
childrenUnmodifiable
Returns an unmodifiable read-only property containing the children of
this
IVisualPart. |
javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>> |
parent
Returns a read-only property that refers to the parent of this
IVisualPart. |
javafx.beans.property.BooleanProperty |
refreshVisual
A boolean property indicating whether this
IVisualPart should
refresh its visuals or not. |
IAdaptable.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 |
|---|
AbstractVisualPart() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates this
IVisualPart (if it is not already active) by
setting (and propagating) the new active state first and delegating to
doActivate() afterwards. |
protected void |
activateAdapters()
Activates the adapters registered at this
AbstractVisualPart. |
protected void |
activateChildren()
Activates the children of this
AbstractVisualPart. |
javafx.beans.property.ReadOnlyBooleanProperty |
activeProperty() |
javafx.beans.property.ReadOnlyObjectProperty<IViewer> |
adaptableProperty() |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
adaptersProperty() |
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(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> children)
Adds the given children to the list of this part's children.
|
void |
addChildren(java.util.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>,java.lang.String> |
anchoragesUnmodifiableProperty()
Returns a read-only set-multimap property containing this part's
anchorages and their corresponding roles.
|
ReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>> |
anchoredsUnmodifiableProperty()
Returns an unmodifiable read-only multiset property representing the
anchoreds of this
IVisualPart. |
void |
attachAnchored(IVisualPart<? extends javafx.scene.Node> anchored)
Used by an anchored
IVisualPart to establish an
anchorage-anchored relationship with this anchorage IVisualPart. |
void |
attachToAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage)
Attaches the given
IVisualPart to the given anchorage under the
"default" role. |
void |
attachToAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage,
java.lang.String role)
Attaches the given
IVisualPart to the given anchorage under the
given role. |
javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> |
childrenUnmodifiableProperty()
Returns an unmodifiable read-only property containing the children of
this
IVisualPart. |
void |
deactivate()
Deactivates this
IVisualPart (if it is active) by delegating to
doDeactivate() first and setting (and propagating) the new
active state afterwards. |
protected void |
deactivateAdapters()
Deactivates the adapters registered at this
AbstractVisualPart. |
protected void |
deactivateChildren()
Deactivates the children of this
AbstractVisualPart. |
void |
detachAnchored(IVisualPart<? extends javafx.scene.Node> anchored)
Used by an anchored
IVisualPart to unestablish an
anchorage-anchored relationship with this anchorage IVisualPart. |
void |
detachFromAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage)
Detaches this
IVisualPart from the given anchorage
IVisualPart under the 'default' role. |
void |
detachFromAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage,
java.lang.String role)
Detaches this
IVisualPart from the given anchorage
IVisualPart under the given role. |
protected IViewer |
determineViewer(IVisualPart<? extends javafx.scene.Node> parent,
com.google.common.collect.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 |
doActivate()
Activates this
AbstractVisualPart, 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 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 abstract V |
doCreateVisual()
Creates this part's visual.
|
protected void |
doDeactivate()
Deactivates this
AbstractVisualPart, which deactivates its
children and adapters. |
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 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 this
IVisualPart's visual. |
IViewer |
getAdaptable()
Gets the value of the property adaptable.
|
<T> T |
getAdapter(AdapterKey<T> key) |
<T> T |
getAdapter(java.lang.Class<T> classKey) |
<T> T |
getAdapter(com.google.common.reflect.TypeToken<T> key) |
<T> AdapterKey<T> |
getAdapterKey(T adapter) |
javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> |
getAdapters()
Gets the value of the property adapters.
|
<T> java.util.Map<AdapterKey<? extends T>,T> |
getAdapters(java.lang.Class<? super T> classKey) |
<T> java.util.Map<AdapterKey<? extends T>,T> |
getAdapters(com.google.common.reflect.TypeToken<? super T> key) |
ObservableSetMultimap<IVisualPart<? extends javafx.scene.Node>,java.lang.String> |
getAnchoragesUnmodifiable()
Gets the value of the property anchoragesUnmodifiable.
|
ObservableMultiset<IVisualPart<? extends javafx.scene.Node>> |
getAnchoredsUnmodifiable()
Gets the value of the property anchoredsUnmodifiable.
|
java.util.Map<AdapterKey<? extends IBehavior>,IBehavior> |
getBehaviors()
Returns a
Map of this part's behaviors and their corresponding
AdapterKeys. |
javafx.collections.ObservableList<IVisualPart<? extends javafx.scene.Node>> |
getChildrenUnmodifiable()
Gets the value of the property childrenUnmodifiable.
|
java.util.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.handlers.IHandler>,org.eclipse.gef.mvc.fx.handlers.IHandler> |
getHandlers()
Returns a
Map of this part's handlers and their corresponding
AdapterKeys. |
IVisualPart<? extends javafx.scene.Node> |
getParent()
Gets the value of the property parent.
|
java.util.Map<AdapterKey<? extends IPolicy>,IPolicy> |
getPolicies()
Returns a
Map of this part's policies and their corresponding
AdapterKeys. |
IRootPart<? extends javafx.scene.Node> |
getRoot()
Returns the
IRootPart. |
V |
getVisual()
Returns this part's visual.
|
boolean |
isActive() |
boolean |
isRefreshVisual()
Gets the value of the property refreshVisual.
|
javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>> |
parentProperty()
Returns a read-only property that refers to the parent of this
IVisualPart. |
void |
refreshVisual()
Refreshes this
IVisualPart's visuals. |
javafx.beans.property.BooleanProperty |
refreshVisualProperty()
A boolean property indicating whether this
IVisualPart should
refresh its visuals or not. |
protected void |
register(IViewer viewer)
Called when a link to the
IViewer is obtained. |
protected void |
registerAtVisualPartMap(IViewer viewer,
V visual)
Registers this part for the given visual in the visual-part-map of the
given
IViewer. |
void |
removeChild(IVisualPart<? extends javafx.scene.Node> child)
Removes the given
IVisualPart from the list of this part's
children. |
void |
removeChildren(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> children)
Removes the given
IVisualParts from the list of this part's
children. |
void |
reorderChild(IVisualPart<? extends javafx.scene.Node> child,
int index)
Swaps the given
IVisualPart 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(T adapter) |
<T> void |
setAdapter(T adapter,
java.lang.String role) |
<T> void |
setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter) |
<T> void |
setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter,
java.lang.String role) |
void |
setParent(IVisualPart<? extends javafx.scene.Node> newParent)
Sets the parent
IVisualPart. |
void |
setRefreshVisual(boolean isRefreshVisual)
Sets the value of the property refreshVisual.
|
protected void |
unregister(IViewer viewer)
Called when the link to the
IViewer 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetViewerpublic javafx.beans.property.ReadOnlyBooleanProperty activeProperty
activeProperty in interface IActivatableisActive()public javafx.beans.property.ReadOnlyObjectProperty<IViewer> adaptableProperty
adaptableProperty in interface IAdaptable.Bound<IViewer>getAdaptable(),
setAdaptable(IViewer)public javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> adaptersProperty
adaptersProperty in interface IAdaptablegetAdapters()public ReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,java.lang.String> anchoragesUnmodifiableProperty
anchoragesUnmodifiableProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.ANCHORAGES_PROPERTY.getAnchoragesUnmodifiable()public ReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>> anchoredsUnmodifiableProperty
anchoredsUnmodifiableProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.ANCHOREDS_PROPERTY.getAnchoredsUnmodifiable()public javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> childrenUnmodifiableProperty
childrenUnmodifiableProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.CHILDREN_PROPERTY.getChildrenUnmodifiable()public javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>> parentProperty
parentProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.PARENT_PROPERTY.getParent(),
setParent(IVisualPart)public javafx.beans.property.BooleanProperty refreshVisualProperty
refreshVisualProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.REFRESH_VISUAL_PROPERTY.isRefreshVisual(),
setRefreshVisual(boolean)public final void activate()
IVisualPart (if it is not already active) by
setting (and propagating) the new active state first and delegating to
doActivate() afterwards. During the call to
doActivate(), isActive() will thus already return
true. If the IVisualPart is already active, this
operation will be a no-op.activate in interface IActivatabledeactivate(),
isActive()protected void activateAdapters()
AbstractVisualPart.protected void activateChildren()
AbstractVisualPart.public javafx.beans.property.ReadOnlyBooleanProperty activeProperty()
activeProperty in interface IActivatableisActive()public javafx.beans.property.ReadOnlyObjectProperty<IViewer> adaptableProperty()
adaptableProperty in interface IAdaptable.Bound<IViewer>getAdaptable(),
setAdaptable(IViewer)public javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> adaptersProperty()
adaptersProperty in interface IAdaptablegetAdapters()public void addChild(IVisualPart<? extends javafx.scene.Node> child)
IVisualPartaddChild in interface IVisualPart<V extends javafx.scene.Node>child - The IVisualPart which is added to the list of this
part's children.public void addChild(IVisualPart<? extends javafx.scene.Node> child, int index)
IVisualPartaddChild in interface IVisualPart<V extends javafx.scene.Node>child - The IVisualPart which is added to the list of this
part's children.index - The index at which the given IVisualPart is inserted
into this part's children list.public void addChildren(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> children)
IVisualPartaddChildren in interface IVisualPart<V extends javafx.scene.Node>children - The IVisualParts which are added to the list of this
part's children.public void addChildren(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> children, int index)
IVisualPartaddChildren in interface IVisualPart<V extends javafx.scene.Node>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.public ReadOnlySetMultimapProperty<IVisualPart<? extends javafx.scene.Node>,java.lang.String> anchoragesUnmodifiableProperty()
IVisualPartanchoragesUnmodifiableProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.ANCHORAGES_PROPERTY.getAnchoragesUnmodifiable()public ReadOnlyMultisetProperty<IVisualPart<? extends javafx.scene.Node>> anchoredsUnmodifiableProperty()
IVisualPartIVisualPart.anchoredsUnmodifiableProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.ANCHOREDS_PROPERTY.getAnchoredsUnmodifiable()public void attachAnchored(IVisualPart<? extends javafx.scene.Node> anchored)
IVisualPartIVisualPart to establish an
anchorage-anchored relationship with this anchorage IVisualPart.
Clients should never call this operation directly but instead add the
anchorage to its anchored via the IVisualPart.attachToAnchorage(IVisualPart)
and IVisualPart.attachToAnchorage(IVisualPart, String) operations, which
will indirectly lead to a call here.
attachAnchored in interface IVisualPart<V extends javafx.scene.Node>anchored - An IVisualPart to attach to this anchorage
IVisualPart as anchored.public void attachToAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage)
IVisualPartIVisualPart to the given anchorage under the
"default" role.attachToAnchorage in interface IVisualPart<V extends javafx.scene.Node>anchorage - The anchorage IVisualPart to attach this part to.public void attachToAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
IVisualPartIVisualPart to the given anchorage under the
given role.attachToAnchorage in interface IVisualPart<V extends javafx.scene.Node>anchorage - The anchorage IVisualPart to attach this part to.role - The role under which this IVisualPart is attached to
the given anchorage. null.public javafx.beans.property.ReadOnlyListProperty<IVisualPart<? extends javafx.scene.Node>> childrenUnmodifiableProperty()
IVisualPartIVisualPart.childrenUnmodifiableProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.CHILDREN_PROPERTY.getChildrenUnmodifiable()public final void deactivate()
IVisualPart (if it is active) by delegating to
doDeactivate() first and setting (and propagating) the new
active state afterwards. During the call to doDeactivate(),
isActive() will thus still return true. If the
IVisualPart is not active, this operation will be a no-op.deactivate in interface IActivatableactivate(),
isActive()protected void deactivateAdapters()
AbstractVisualPart.protected void deactivateChildren()
AbstractVisualPart.public void detachAnchored(IVisualPart<? extends javafx.scene.Node> anchored)
IVisualPartIVisualPart to unestablish an
anchorage-anchored relationship with this anchorage IVisualPart.
Clients should never call this operation directly but instead remove the
anchorage from its anchored via the
IVisualPart.detachFromAnchorage(IVisualPart) or
IVisualPart.detachFromAnchorage(IVisualPart, String) operations, which will
indirectly lead to a call here.
detachAnchored in interface IVisualPart<V extends javafx.scene.Node>anchored - An IVisualPart (currently attached as anchored to this
anchorage IVisualPart) to detach from this anchorage
IVisualPart as anchored.public void detachFromAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage)
IVisualPartIVisualPart from the given anchorage
IVisualPart under the 'default' role.detachFromAnchorage in interface IVisualPart<V extends javafx.scene.Node>anchorage - The anchorage IVisualPart to detach this part from.public void detachFromAnchorage(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
IVisualPartIVisualPart from the given anchorage
IVisualPart under the given role.detachFromAnchorage in interface IVisualPart<V extends javafx.scene.Node>anchorage - The anchorage IVisualPart to detach this part from.role - The role under which the IVisualPart can be found in
this part's anchorages.protected IViewer determineViewer(IVisualPart<? extends javafx.scene.Node> parent, com.google.common.collect.Multiset<IVisualPart<? extends javafx.scene.Node>> anchoreds)
parent - The parent to obtain the viewer from.anchoreds - The anchoreds to alternatively obtain the viewer from.public void dispose()
dispose in interface IDisposableprotected void doActivate()
AbstractVisualPart, which activates its children
and adapters.protected void doAddChildVisual(IVisualPart<? extends javafx.scene.Node> child, int index)
IVisualPart's visual.child - The IVisualPart being addedindex - The child's positionaddChild(IVisualPart, int)protected void doAttachToAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
anchorage - The anchorage IVisualPart.role - The anchorage role.protected abstract V doCreateVisual()
protected void doDeactivate()
AbstractVisualPart, which deactivates its
children and adapters.protected void doDetachFromAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
anchorage - The anchorage IVisualPart.role - The anchorage role.protected abstract void doRefreshVisual(V visual)
visual - This part's visual.protected void doRemoveChildVisual(IVisualPart<? extends javafx.scene.Node> child, int index)
IVisualPart's visual.child - The child IVisualPart.index - The index of the child whose visual is to be removed.public IViewer getAdaptable()
getAdaptable in interface IAdaptable.Bound<IViewer>public <T> T getAdapter(AdapterKey<T> key)
getAdapter in interface IAdaptablepublic <T> T getAdapter(java.lang.Class<T> classKey)
getAdapter in interface IAdaptablepublic <T> T getAdapter(com.google.common.reflect.TypeToken<T> key)
getAdapter in interface IAdaptablepublic <T> AdapterKey<T> getAdapterKey(T adapter)
getAdapterKey in interface IAdaptablepublic javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> getAdapters()
getAdapters in interface IAdaptablepublic <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(java.lang.Class<? super T> classKey)
getAdapters in interface IAdaptablepublic <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(com.google.common.reflect.TypeToken<? super T> key)
getAdapters in interface IAdaptablepublic ObservableSetMultimap<IVisualPart<? extends javafx.scene.Node>,java.lang.String> getAnchoragesUnmodifiable()
getAnchoragesUnmodifiable in interface IVisualPart<V extends javafx.scene.Node>ObservableSetMultimap of this part's anchorages and
their corresponding roles.public ObservableMultiset<IVisualPart<? extends javafx.scene.Node>> getAnchoredsUnmodifiable()
getAnchoredsUnmodifiable in interface IVisualPart<V extends javafx.scene.Node>ObservableMultiset of this part's
anchoreds.public java.util.Map<AdapterKey<? extends IBehavior>,IBehavior> getBehaviors()
IVisualPartMap of this part's behaviors and their corresponding
AdapterKeys.getBehaviors in interface IVisualPart<V extends javafx.scene.Node>Map of this part's behaviors and their corresponding
AdapterKeys.public javafx.collections.ObservableList<IVisualPart<? extends javafx.scene.Node>> getChildrenUnmodifiable()
getChildrenUnmodifiable in interface IVisualPart<V extends javafx.scene.Node>ObservableList of this part's children.public java.util.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.handlers.IHandler>,org.eclipse.gef.mvc.fx.handlers.IHandler> getHandlers()
IVisualPartMap of this part's handlers and their corresponding
AdapterKeys.getHandlers in interface IVisualPart<V extends javafx.scene.Node>Map of this part's handlers and their corresponding
AdapterKeys.public IVisualPart<? extends javafx.scene.Node> getParent()
getParent in interface IVisualPart<V extends javafx.scene.Node>public java.util.Map<AdapterKey<? extends IPolicy>,IPolicy> getPolicies()
IVisualPartMap of this part's policies and their corresponding
AdapterKeys.getPolicies in interface IVisualPart<V extends javafx.scene.Node>Map of this part's policies and their corresponding
AdapterKeys.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<V extends javafx.scene.Node>null or the IRootPartpublic V getVisual()
IVisualPartgetVisual in interface IVisualPart<V extends javafx.scene.Node>public boolean isActive()
isActive in interface IActivatabletrue if this IVisualPart is active.public boolean isRefreshVisual()
isRefreshVisual in interface IVisualPart<V extends javafx.scene.Node>true if this part is allowed to refresh its
visualization based on its content, otherwise false.public javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<? extends javafx.scene.Node>> parentProperty()
IVisualPartIVisualPart.parentProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.PARENT_PROPERTY.getParent(),
setParent(IVisualPart)public final void refreshVisual()
IVisualPart's visuals. Delegates to
doRefreshVisual(Node) in case isRefreshVisual() is not
set to false.refreshVisual in interface IVisualPart<V extends javafx.scene.Node>public javafx.beans.property.BooleanProperty refreshVisualProperty()
IVisualPartIVisualPart should
refresh its visuals or not.refreshVisualProperty in interface IVisualPart<V extends javafx.scene.Node>IVisualPart.REFRESH_VISUAL_PROPERTY.isRefreshVisual(),
setRefreshVisual(boolean)protected void register(IViewer viewer)
IViewer is obtained. Registers this
IVisualPart for its "main" visual (i.e. the one returned by
getVisual()) at the IViewer.getVisualPartMap() of the
given IViewer. To simplify matters, this IVisualPart 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 an IVisualPart
for a given visual in the visual-part-map, it is required to walk up the
visual hierarchy until a registered visual is found.viewer - The IViewer to register at.protected void registerAtVisualPartMap(IViewer viewer, V visual)
IViewer.viewer - The IViewer of which the visual-part-map is extended.visual - The visual for which this part is registered in the viewer's
visual-part-map.public void removeChild(IVisualPart<? extends javafx.scene.Node> child)
IVisualPartIVisualPart from the list of this part's
children.removeChild in interface IVisualPart<V extends javafx.scene.Node>child - The IVisualPart which is removed from the list of this
part's children.public void removeChildren(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> children)
IVisualPartIVisualParts from the list of this part's
children.removeChildren in interface IVisualPart<V extends javafx.scene.Node>children - The IVisualParts which are removed from the list of
this part's children.public void reorderChild(IVisualPart<? extends javafx.scene.Node> child, int index)
IVisualPartIVisualPart with the part at the given index
position within this part's list of children.reorderChild in interface IVisualPart<V extends javafx.scene.Node>child - The IVisualPart which is reordered.index - The index to which the part is reordered.public void setAdaptable(IViewer viewer)
setAdaptable in interface IAdaptable.Bound<IViewer>public <T> void setAdapter(T adapter)
setAdapter in interface IAdaptablepublic <T> void setAdapter(T adapter,
java.lang.String role)
setAdapter in interface IAdaptablepublic <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter)
setAdapter in interface IAdaptable@InjectAdapters public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter, java.lang.String role)
setAdapter in interface IAdaptablepublic void setParent(IVisualPart<? extends javafx.scene.Node> newParent)
IVisualPart.setParent in interface IVisualPart<V extends javafx.scene.Node>newParent - The new parent IVisualPart or null.public void setRefreshVisual(boolean isRefreshVisual)
setRefreshVisual in interface IVisualPart<V extends javafx.scene.Node>isRefreshVisual - Whether IVisualPart.refreshVisual() should perform updates of the
visual (true) or behave like a no-op operation (
false).protected void unregister(IViewer viewer)
IViewer is lost. Unregisters this
IVisualPart for its "main" visual (i.e. the one returned by
getVisual()) from the IViewer.getVisualPartMap() of the
given IViewer. To simplify matters, this IVisualPart 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 an IVisualPart
for a given visual in the visual-part-map, it is required to walk up the
visual hierarchy until a registered visual is found.viewer - The IViewer to unregister from.protected void unregisterFromVisualPartMap(IViewer viewer, V visual)
viewer - The IViewer of which the visual-part-map is changed.visual - The visual which is removed from the visual-part-map.public <T> void unsetAdapter(T adapter)
unsetAdapter in interface IAdaptableCopyright (c) 2014, 2016 itemis AG and others. All rights reserved.