Package org.eclipse.gef.mvc.fx.parts

# Class AbstractVisualPart<V extends Node>

java.lang.Object
org.eclipse.gef.mvc.fx.parts.AbstractVisualPart<V>

Type Parameters:
  `V` - The visual node used by this `AbstractVisualPart`.

All Implemented Interfaces:
  `IActivatable`, `IAdaptable`, `IAdaptable.Bound<IViewer>`, `IDisposable`, `IVisualPart<V>`

Direct Known Subclasses:
  `AbstractContentPart`, `AbstractFeedbackPart`, `AbstractHandlePart`, `LayeredRootPart`

public abstract class AbstractVisualPart<V extends Node> extends Object implements IVisualPart<V>
The `AbstractVisualPart` is an abstract implementation of the `IVisualPart` interface.

## Property Summary

Properties
Type
Property
Description
`ReadOnlyBooleanProperty`
`active`
`ReadOnlyObjectProperty<IViewer>`
`adaptable`
`ReadOnlyMapProperty<AdapterKey<?>,Object>`
`adapters`
`ReadOnlySetMultimapProperty<IVisualPart<? extends Node>,String>`
`anchoragesUnmodifiable`
Returns a read-only set-multimap property containing this part's anchorages and their corresponding roles.
`ReadOnlyMultisetProperty<IVisualPart<? extends Node>>`
`anchoredsUnmodifiable`
Returns an unmodifiable read-only multiset property representing the anchoreds of this `IVisualPart`.
`ReadOnlyListProperty<IVisualPart<? extends Node>>`
`childrenUnmodifiable`
Returns an unmodifiable read-only property containing the children of this `IVisualPart`.
`ReadOnlyObjectProperty<IVisualPart<? extends Node>>`
`parent`
Returns a read-only property that refers to the parent of this `IVisualPart`.
`BooleanProperty`
`refreshVisual`
A boolean property indicating whether this `IVisualPart` 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

Constructors
Constructor
Description
`AbstractVisualPart()`

## Method Summary

Modifier and Type
Method
Description
`final 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`.
`ReadOnlyBooleanProperty`
`activeProperty()`
`ReadOnlyObjectProperty<IViewer>`
`adaptableProperty()`
`ReadOnlyMapProperty<AdapterKey<?>,Object>`
`adaptersProperty()`
`void`
`addChild(IVisualPart<? extends Node> child)`
Adds the given child to the list of this part's children.
`void`
`addChild(IVisualPart<? extends 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 Node>> children)`
Adds the given children to the list of this part's children.
`void`
`addChildren(List<? extends IVisualPart<? extends Node>> children, int index)`
Adds the given children to the list of this part's children at the specified index.
`ReadOnlySetMultimapProperty<IVisualPart<? extends Node>,String>`
`anchoragesUnmodifiableProperty()`
Returns a read-only set-multimap property containing this part's anchorages and their corresponding roles.
`ReadOnlyMultisetProperty<IVisualPart<? extends Node>>`
`anchoredsUnmodifiableProperty()`
Returns an unmodifiable read-only multiset property representing the anchoreds of this `IVisualPart`.
`void`
`attachAnchored(IVisualPart<? extends Node> anchored)`
Used by an anchored `IVisualPart` to establish an anchorage-anchored relationship with this anchorage `IVisualPart`.
`void`
`attachToAnchorage(IVisualPart<? extends Node> anchorage)`
Attaches the given `IVisualPart` to the given anchorage under the "default" role.
`void`
`attachToAnchorage(IVisualPart<? extends Node> anchorage, String role)`
Attaches the given `IVisualPart` to the given anchorage under the given role.
`ReadOnlyListProperty<IVisualPart<? extends Node>>`
`childrenUnmodifiableProperty()`
Returns an unmodifiable read-only property containing the children of this `IVisualPart`.
`final 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 Node> anchored)`
Used by an anchored `IVisualPart` to unestablish an anchorage-anchored relationship with this anchorage `IVisualPart`.
`void`
`detachFromAnchorage(IVisualPart<? extends Node> anchorage)`
Detaches this `IVisualPart` from the given anchorage `IVisualPart` under the 'default' role.
`void`
`detachFromAnchorage(IVisualPart<? extends Node> anchorage, String role)`
Detaches this `IVisualPart` from the given anchorage `IVisualPart` under the given role.
`protected IViewer`
`determineViewer(IVisualPart<? extends Node> parent, Multiset<IVisualPart<? extends 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 Node> child, int index)`
Performs the addition of the child's visual to this `IVisualPart`'s visual.
`protected void`
`doAttachToAnchorageVisual(IVisualPart<? extends Node> anchorage, 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 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 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(TypeToken<T> key)`
`<T> T`
`getAdapter(Class<T> classKey)`
`<T> T`
`getAdapter(AdapterKey<T> key)`
`<T> AdapterKey<T>`
`getAdapterKey(T adapter)`
`ObservableMap<AdapterKey<?>,Object>`
`getAdapters()`
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 Node>,String>`
`getAnchoragesUnmodifiable()`
Gets the value of the property anchoragesUnmodifiable.
`ObservableMultiset<IVisualPart<? extends Node>>`
`getAnchoredsUnmodifiable()`
Gets the value of the property anchoredsUnmodifiable.
`Map<AdapterKey<? extends IBehavior>,IBehavior>`
`getBehaviors()`
Returns a `Map` of this part's behaviors and their corresponding `AdapterKey`s.
`ObservableList<IVisualPart<? extends Node>>`
`getChildrenUnmodifiable()`
Gets the value of the property childrenUnmodifiable.
`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 `AdapterKey`s.
`IVisualPart<? extends Node>`
`getParent()`
Gets the value of the property parent.
`Map<AdapterKey<? extends IPolicy>,IPolicy>`
`getPolicies()`
Returns a `Map` of this part's policies and their corresponding `AdapterKey`s.
`IRootPart<? extends Node>`
`getRoot()`
Returns the `IRootPart`.
`V`
`getVisual()`
Returns this part's visual.
`boolean`
`isActive()`
`boolean`
`isRefreshVisual()`
Gets the value of the property refreshVisual.
`ReadOnlyObjectProperty<IVisualPart<? extends Node>>`
`parentProperty()`
Returns a read-only property that refers to the parent of this `IVisualPart`.
`final void`
`refreshVisual()`
Refreshes this `IVisualPart`'s visuals.
`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 Node> child)`
Removes the given `IVisualPart` from the list of this part's children.
`void`
`removeChildren(List<? extends IVisualPart<? extends Node>> children)`
Removes the given `IVisualPart`s from the list of this part's children.
`void`
`reorderChild(IVisualPart<? extends 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(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 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)`

### 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 ReadOnlyBooleanProperty activeProperty

Specified by:
  `activeProperty` in interface `IActivatable`
See Also:
  - `isActive()`

### adaptable

public ReadOnlyObjectProperty<IViewer> adaptableProperty

Specified by:
  `adaptableProperty` in interface `IAdaptable.Bound<V extends Node>`
See Also:
  - `getAdaptable()`
  - `setAdaptable(IViewer)`

### adapters

public ReadOnlyMapProperty<AdapterKey<?>,Object> adaptersProperty

Specified by:
  `adaptersProperty` in interface `IAdaptable`
See Also:
  - `getAdapters()`

### anchoragesUnmodifiable

public ReadOnlySetMultimapProperty<IVisualPart<? extends Node>,String> anchoragesUnmodifiableProperty

Specified by:
  `anchoragesUnmodifiableProperty` in interface `IVisualPart<V extends Node>`
Returns:
  A read-only set-multimap property named `IVisualPart.ANCHORAGES_PROPERTY`.
See Also:
  - `getAnchoragesUnmodifiable()`

### anchoredsUnmodifiable

public ReadOnlyMultisetProperty<IVisualPart<? extends Node>> anchoredsUnmodifiableProperty

Specified by:
  `anchoredsUnmodifiableProperty` in interface `IVisualPart<V extends Node>`
Returns:
  An unmodifiable read-only multiset property named `IVisualPart.ANCHOREDS_PROPERTY`.
See Also:
  - `getAnchoredsUnmodifiable()`

### childrenUnmodifiable

public ReadOnlyListProperty<IVisualPart<? extends Node>> childrenUnmodifiableProperty

Specified by:
  `childrenUnmodifiableProperty` in interface `IVisualPart<V extends Node>`
Returns:
  An unmodifiable read-only property named `IVisualPart.CHILDREN_PROPERTY`.
See Also:
  - `getChildrenUnmodifiable()`

### parent

public ReadOnlyObjectProperty<IVisualPart<? extends Node>> parentProperty

Specified by:
  `parentProperty` in interface `IVisualPart<V extends Node>`
Returns:
  A read-only property named `IVisualPart.PARENT_PROPERTY`.
See Also:
  - `getParent()`
  - `setParent(IVisualPart)`

### refreshVisual

public BooleanProperty refreshVisualProperty

Specified by:
  `refreshVisualProperty` in interface `IVisualPart<V extends Node>`
Returns:
  A boolean property named `IVisualPart.REFRESH_VISUAL_PROPERTY`.
See Also:
  - `isRefreshVisual()`
  - `setRefreshVisual(boolean)`

## Constructor Details

### AbstractVisualPart

public AbstractVisualPart()

## Method Details

### activate

public final 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. During the call to `doActivate()`, `isActive()` will thus already return `true`. If the `IVisualPart` is already active, this operation will be a no-op.

Specified by:
  `activate` in interface `IActivatable`
See Also:
  - `deactivate()`
  - `isActive()`

### activateAdapters

protected void activateAdapters()
Activates the adapters registered at this `AbstractVisualPart`.

### activateChildren

protected void activateChildren()
Activates the children of this `AbstractVisualPart`.

### activeProperty

public ReadOnlyBooleanProperty activeProperty()

Specified by:
  `activeProperty` in interface `IActivatable`
See Also:
  - `isActive()`

### adaptableProperty

public ReadOnlyObjectProperty<IViewer> adaptableProperty()

Specified by:
  `adaptableProperty` in interface `IAdaptable.Bound<V extends Node>`
See Also:
  - `getAdaptable()`
  - `setAdaptable(IViewer)`

### adaptersProperty

public ReadOnlyMapProperty<AdapterKey<?>,Object> adaptersProperty()

Specified by:
  `adaptersProperty` in interface `IAdaptable`
See Also:
  - `getAdapters()`

### addChild

public void addChild(IVisualPart<? extends Node> child)
Description copied from interface: `IVisualPart`
Adds the given child to the list of this part's children.

Specified by:
  `addChild` in interface `IVisualPart<V extends Node>`
Parameters:
  `child` - The `IVisualPart` which is added to the list of this part's children.

### addChild

public void addChild(IVisualPart<? extends Node> child, int index)
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 interface `IVisualPart<V extends Node>`
Parameters:
  `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.

### addChildren

public void addChildren(List<? extends IVisualPart<? extends Node>> children)
Description copied from interface: `IVisualPart`
Adds the given children to the list of this part's children.

Specified by:
  `addChildren` in interface `IVisualPart<V extends Node>`
Parameters:
  `children` - The `IVisualPart`s which are added to the list of this part's children.

### addChildren

public void addChildren(List<? extends IVisualPart<? extends 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 interface `IVisualPart<V extends Node>`
Parameters:
  `children` - The `IVisualPart`s which are added to the list of this part's children.
  `index` - The index at which the given `IVisualPart`s are inserted into this part's children list.

### anchoragesUnmodifiableProperty

public ReadOnlySetMultimapProperty<IVisualPart<? extends 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 interface `IVisualPart<V extends Node>`
Returns:
  A read-only set-multimap property named `IVisualPart.ANCHORAGES_PROPERTY`.
See Also:
  - `getAnchoragesUnmodifiable()`

### anchoredsUnmodifiableProperty

public ReadOnlyMultisetProperty<IVisualPart<? extends Node>> anchoredsUnmodifiableProperty()
Description copied from interface: `IVisualPart`
Returns an unmodifiable read-only multiset property representing the anchoreds of this `IVisualPart`.

Specified by:
  `anchoredsUnmodifiableProperty` in interface `IVisualPart<V extends Node>`
Returns:
  An unmodifiable read-only multiset property named `IVisualPart.ANCHOREDS_PROPERTY`.
See Also:
  - `getAnchoredsUnmodifiable()`

### attachAnchored

public void attachAnchored(IVisualPart<? extends Node> anchored)
Description copied from interface: `IVisualPart`
Used by an anchored `IVisualPart` 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.

Specified by:
  `attachAnchored` in interface `IVisualPart<V extends Node>`
Parameters:
  `anchored` - An `IVisualPart` to attach to this anchorage `IVisualPart` as anchored.

### attachToAnchorage

public void attachToAnchorage(IVisualPart<? extends Node> anchorage)
Description copied from interface: `IVisualPart`
Attaches the given `IVisualPart` to the given anchorage under the "default" role.

Specified by:
  `attachToAnchorage` in interface `IVisualPart<V extends Node>`
Parameters:
  `anchorage` - The anchorage `IVisualPart` to attach this part to.

### attachToAnchorage

public void attachToAnchorage(IVisualPart<? extends Node> anchorage, String role)
Description copied from interface: `IVisualPart`
Attaches the given `IVisualPart` to the given anchorage under the given role.

Specified by:
  `attachToAnchorage` in interface `IVisualPart<V extends Node>`
Parameters:
  `anchorage` - The anchorage `IVisualPart` to attach this part to.
  `role` - The role under which this `IVisualPart` is attached to the given anchorage. `null`.

### childrenUnmodifiableProperty

public ReadOnlyListProperty<IVisualPart<? extends Node>> childrenUnmodifiableProperty()
Description copied from interface: `IVisualPart`
Returns an unmodifiable read-only property containing the children of this `IVisualPart`.

Specified by:
  `childrenUnmodifiableProperty` in interface `IVisualPart<V extends Node>`
Returns:
  An unmodifiable read-only property named `IVisualPart.CHILDREN_PROPERTY`.
See Also:
  - `getChildrenUnmodifiable()`

### deactivate

public final void deactivate()
Deactivates this `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.

Specified by:
  `deactivate` in interface `IActivatable`
See Also:
  - `activate()`
  - `isActive()`

### deactivateAdapters

protected void deactivateAdapters()
Deactivates the adapters registered at this `AbstractVisualPart`.

### deactivateChildren

protected void deactivateChildren()
Deactivates the children of this `AbstractVisualPart`.

### detachAnchored

public void detachAnchored(IVisualPart<? extends Node> anchored)
Description copied from interface: `IVisualPart`
Used by an anchored `IVisualPart` 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.

Specified by:
  `detachAnchored` in interface `IVisualPart<V extends Node>`
Parameters:
  `anchored` - An `IVisualPart` (currently attached as anchored to this anchorage `IVisualPart`) to detach from this anchorage `IVisualPart` as anchored.

### detachFromAnchorage

public void detachFromAnchorage(IVisualPart<? extends Node> anchorage)
Description copied from interface: `IVisualPart`
Detaches this `IVisualPart` from the given anchorage `IVisualPart` under the 'default' role.

Specified by:
  `detachFromAnchorage` in interface `IVisualPart<V extends Node>`
Parameters:
  `anchorage` - The anchorage `IVisualPart` to detach this part from.

### detachFromAnchorage

public void detachFromAnchorage(IVisualPart<? extends Node> anchorage, String role)
Description copied from interface: `IVisualPart`
Detaches this `IVisualPart` from the given anchorage `IVisualPart` under the given role.

Specified by:
  `detachFromAnchorage` in interface `IVisualPart<V extends Node>`
Parameters:
  `anchorage` - The anchorage `IVisualPart` to detach this part from.
  `role` - The role under which the `IVisualPart` can be found in this part's anchorages.

### determineViewer

protected IViewer determineViewer(IVisualPart<? extends Node> parent, Multiset<IVisualPart<? extends 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 interface `IDisposable`

### doActivate

protected void doActivate()
Activates this `AbstractVisualPart`, which activates its children and adapters.

### doAddChildVisual

protected void doAddChildVisual(IVisualPart<? extends Node> child, int index)
Performs the addition of the child's visual to this `IVisualPart`'s visual.

Parameters:
  `child` - The `IVisualPart` being added
  `index` - The child's position
See Also:
  - `addChild(IVisualPart, int)`

### doAttachToAnchorageVisual

protected void doAttachToAnchorageVisual(IVisualPart<? extends Node> anchorage, String role)
Attaches this part's visual to the visual of the given anchorage.

Parameters:
  `anchorage` - The anchorage `IVisualPart`.
  `role` - The anchorage role.

### doCreateVisual

protected abstract V doCreateVisual()
Creates this part's visual.

Returns:
  This part's visual.

### doDeactivate

protected void doDeactivate()
Deactivates this `AbstractVisualPart`, which deactivates its children and adapters.

### doDetachFromAnchorageVisual

protected void doDetachFromAnchorageVisual(IVisualPart<? extends Node> anchorage, String role)
Detaches this part's visual from the visual of the given anchorage.

Parameters:
  `anchorage` - The anchorage `IVisualPart`.
  `role` - The anchorage role.

### doRefreshVisual

protected abstract void doRefreshVisual(V visual)
Refreshes this part's visualization based on this part's content.

Parameters:
  `visual` - This part's visual.

### doRemoveChildVisual

protected void doRemoveChildVisual(IVisualPart<? extends Node> child, int index)
Removes the child's visual from this `IVisualPart`'s visual.

Parameters:
  `child` - The child `IVisualPart`.
  `index` - The index of the child whose visual is to be removed.

### getAdaptable

public IViewer getAdaptable()
Gets the value of the property adaptable.

Specified by:
  `getAdaptable` in interface `IAdaptable.Bound<V extends Node>`
Property description:

### getAdapter

public <T> T getAdapter(AdapterKey<T> key)

Specified by:
  `getAdapter` in interface `IAdaptable`

### getAdapter

public <T> T getAdapter(Class<T> classKey)

Specified by:
  `getAdapter` in interface `IAdaptable`

### getAdapter

public <T> T getAdapter(TypeToken<T> key)

Specified by:
  `getAdapter` in interface `IAdaptable`

### getAdapterKey

public <T> AdapterKey<T> getAdapterKey(T adapter)

Specified by:
  `getAdapterKey` in interface `IAdaptable`

### getAdapters

public ObservableMap<AdapterKey<?>,Object> getAdapters()
Gets the value of the property adapters.

Specified by:
  `getAdapters` in interface `IAdaptable`
Property description:

### getAdapters

public <T> Map<AdapterKey<? extends T>,T> getAdapters(Class<? super T> classKey)

Specified by:
  `getAdapters` in interface `IAdaptable`

### getAdapters

public <T> Map<AdapterKey<? extends T>,T> getAdapters(TypeToken<? super T> key)

Specified by:
  `getAdapters` in interface `IAdaptable`

### getAnchoragesUnmodifiable

public ObservableSetMultimap<IVisualPart<? extends Node>,String> getAnchoragesUnmodifiable()
Gets the value of the property anchoragesUnmodifiable.

Specified by:
  `getAnchoragesUnmodifiable` in interface `IVisualPart<V extends Node>`
Property description:
Returns:
  A `ObservableSetMultimap` of this part's anchorages and their corresponding roles.

### getAnchoredsUnmodifiable

public ObservableMultiset<IVisualPart<? extends Node>> getAnchoredsUnmodifiable()
Gets the value of the property anchoredsUnmodifiable.

Specified by:
  `getAnchoredsUnmodifiable` in interface `IVisualPart<V extends Node>`
Property description:
Returns:
  An unmodifiable `ObservableMultiset` of this part's anchoreds.

### getBehaviors

public Map<AdapterKey<? extends IBehavior>,IBehavior> getBehaviors()
Description copied from interface: `IVisualPart`
Returns a `Map` of this part's behaviors and their corresponding `AdapterKey`s.

Specified by:
  `getBehaviors` in interface `IVisualPart<V extends Node>`
Returns:
  A `Map` of this part's behaviors and their corresponding `AdapterKey`s.

### getChildrenUnmodifiable

public ObservableList<IVisualPart<? extends Node>> getChildrenUnmodifiable()
Gets the value of the property childrenUnmodifiable.

Specified by:
  `getChildrenUnmodifiable` in interface `IVisualPart<V extends 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 a `Map` of this part's handlers and their corresponding `AdapterKey`s.

Specified by:
  `getHandlers` in interface `IVisualPart<V extends Node>`
Returns:
  A `Map` of this part's handlers and their corresponding `AdapterKey`s.

### getParent

public IVisualPart<? extends Node> getParent()
Gets the value of the property parent.

Specified by:
  `getParent` in interface `IVisualPart<V extends Node>`
Property description:
Returns:
  The parent of this part.

### getPolicies

public Map<AdapterKey<? extends IPolicy>,IPolicy> getPolicies()
Description copied from interface: `IVisualPart`
Returns a `Map` of this part's policies and their corresponding `AdapterKey`s.

Specified by:
  `getPolicies` in interface `IVisualPart<V extends Node>`
Returns:
  A `Map` of this part's policies and their corresponding `AdapterKey`s.

### getRoot

public IRootPart<? extends Node> getRoot()
Description copied from interface: `IVisualPart`
Returns the `IRootPart`. 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 interface `IVisualPart<V extends Node>`
Returns:
  `null` or the `IRootPart`

### getVisual

public V getVisual()
Description copied from interface: `IVisualPart`
Returns this part's visual.

Specified by:
  `getVisual` in interface `IVisualPart<V extends Node>`
Returns:
  This part's visual.

### isActive

public boolean isActive()

Specified by:
  `isActive` in interface `IActivatable`
Returns:
  `true` if this `IVisualPart` is active.

### isRefreshVisual

public boolean isRefreshVisual()
Gets the value of the property refreshVisual.

Specified by:
  `isRefreshVisual` in interface `IVisualPart<V extends Node>`
Property description:
Returns:
  `true` if this part is allowed to refresh its visualization based on its content, otherwise `false`.

### parentProperty

public ReadOnlyObjectProperty<IVisualPart<? extends Node>> parentProperty()
Description copied from interface: `IVisualPart`
Returns a read-only property that refers to the parent of this `IVisualPart`.

Specified by:
  `parentProperty` in interface `IVisualPart<V extends Node>`
Returns:
  A read-only property named `IVisualPart.PARENT_PROPERTY`.
See Also:
  - `getParent()`
  - `setParent(IVisualPart)`

### refreshVisual

public final void refreshVisual()
Refreshes this `IVisualPart`'s visuals. Delegates to `doRefreshVisual(Node)` in case `isRefreshVisual()` is not set to `false`.

Specified by:
  `refreshVisual` in interface `IVisualPart<V extends Node>`

### refreshVisualProperty

public BooleanProperty refreshVisualProperty()
Description copied from interface: `IVisualPart`
A boolean property indicating whether this `IVisualPart` should refresh its visuals or not.

Specified by:
  `refreshVisualProperty` in interface `IVisualPart<V extends Node>`
Returns:
  A boolean property named `IVisualPart.REFRESH_VISUAL_PROPERTY`.
See Also:
  - `isRefreshVisual()`
  - `setRefreshVisual(boolean)`

### register

protected void register(IViewer viewer)
Called when a link to the `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.

Parameters:
  `viewer` - The `IViewer` to register at.

### registerAtVisualPartMap

protected void registerAtVisualPartMap(IViewer viewer, V visual)
Registers this part for the given visual in the visual-part-map of the given `IViewer`.

Parameters:
  `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.

### removeChild

public void removeChild(IVisualPart<? extends Node> child)
Description copied from interface: `IVisualPart`
Removes the given `IVisualPart` from the list of this part's children.

Specified by:
  `removeChild` in interface `IVisualPart<V extends Node>`
Parameters:
  `child` - The `IVisualPart` which is removed from the list of this part's children.

### removeChildren

public void removeChildren(List<? extends IVisualPart<? extends Node>> children)
Description copied from interface: `IVisualPart`
Removes the given `IVisualPart`s from the list of this part's children.

Specified by:
  `removeChildren` in interface `IVisualPart<V extends Node>`
Parameters:
  `children` - The `IVisualPart`s which are removed from the list of this part's children.

### reorderChild

public void reorderChild(IVisualPart<? extends Node> child, int index)
Description copied from interface: `IVisualPart`
Swaps the given `IVisualPart` with the part at the given index position within this part's list of children.

Specified by:
  `reorderChild` in interface `IVisualPart<V extends Node>`
Parameters:
  `child` - The `IVisualPart` which is reordered.
  `index` - The index to which the part is reordered.

### setAdaptable

public void setAdaptable(IViewer viewer)
Sets the value of the property adaptable.

Specified by:
  `setAdaptable` in interface `IAdaptable.Bound<V extends Node>`
Property description:

### setAdapter

public <T> void setAdapter(T adapter)

Specified by:
  `setAdapter` in interface `IAdaptable`

### setAdapter

public <T> void setAdapter(T adapter, String role)

Specified by:
  `setAdapter` in interface `IAdaptable`

### setAdapter

public <T> void setAdapter(TypeToken<T> adapterType, T adapter)

Specified by:
  `setAdapter` in interface `IAdaptable`

### setAdapter

@InjectAdapters public <T> void setAdapter(TypeToken<T> adapterType, T adapter, String role)

Specified by:
  `setAdapter` in interface `IAdaptable`

### setParent

public void setParent(IVisualPart<? extends Node> newParent)
Sets the parent `IVisualPart`.

Specified by:
  `setParent` in interface `IVisualPart<V extends Node>`
Parameters:
  `newParent` - The new parent `IVisualPart` or `null`.

### setRefreshVisual

public void setRefreshVisual(boolean isRefreshVisual)
Sets the value of the property refreshVisual.

Specified by:
  `setRefreshVisual` in interface `IVisualPart<V extends Node>`
Property description:
Parameters:
  `isRefreshVisual` - Whether `IVisualPart.refreshVisual()` should perform updates of the visual (`true`) or behave like a no-op operation ( `false`).

### unregister

protected void unregister(IViewer viewer)
Called when the link to the `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.

Parameters:
  `viewer` - The `IViewer` to unregister from.

### unregisterFromVisualPartMap

protected void unregisterFromVisualPartMap(IViewer viewer, V visual)
Removes the given visual from the visual-part-map of the given viewer.

Parameters:
  `viewer` - The `IViewer` 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 interface `IAdaptable`