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

# Interface IContentPart<V extends javafx.scene.Node>

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

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

All Known Subinterfaces:
  `IBendableContentPart<V>`, `IResizableContentPart<V>`, `ITransformableContentPart<V>`

All Known Implementing Classes:
  `AbstractContentPart`

public interface IContentPart<V extends javafx.scene.Node> extends IVisualPart<V>
An `IVisualPart` that visualizes an underlying content element.

Noimplement:
  This interface is not intended to be implemented by clients. Instead, `AbstractContentPart` should be sub-classed.

## Property Summary

Properties
Type
Property
Description
`ReadOnlySetMultimapProperty<Object,String>`
`contentAnchoragesUnmodifiable`
Returns an unmodifiable read-only set-multimap property containing the content anchorages.
`javafx.beans.property.ReadOnlyListProperty<Object>`
`contentChildrenUnmodifiable`
Returns an unmodfiable read-only property containing the content children.
`javafx.beans.property.ObjectProperty<Object>`
`content`
A writable property representing the `IContentPart`'s content.

### Properties inherited from interface org.eclipse.gef.common.activate.IActivatable

`active`

### Properties inherited from interface org.eclipse.gef.common.adapt.IAdaptable

`adapters`

### Properties inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound

`adaptable`

### Properties inherited from interface org.eclipse.gef.mvc.fx.parts.IVisualPart

`anchoragesUnmodifiable, anchoredsUnmodifiable, childrenUnmodifiable, parent, refreshVisual`

## 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
Modifier and Type
Field
Description
`static final String`
`CONTENT_ANCHORAGES_PROPERTY`
Name of the `contentAnchoragesUnmodifiableProperty()`.
`static final String`
`CONTENT_CHILDREN_PROPERTY`
Name of the `contentChildrenUnmodifiableProperty()`.
`static final String`
`CONTENT_PROPERTY`
Name of the `content property`.

### 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`

## Method Summary

Modifier and Type
Method
Description
`void`
`addContentChild(Object contentChild, int index)`
Inserts the given contentChild as a child to this part's content, so that it will be returned by subsequent calls to `getContentChildrenUnmodifiable()`.
`void`
`attachToContentAnchorage(Object contentAnchorage, String role)`
Attaches this part's content to the given contentAnchorage under the specified role, so that it will be returned by subsequent calls to `getContentAnchoragesUnmodifiable()`.
`ReadOnlySetMultimapProperty<Object,String>`
`contentAnchoragesUnmodifiableProperty()`
Returns an unmodifiable read-only set-multimap property containing the content anchorages.
`javafx.beans.property.ReadOnlyListProperty<Object>`
`contentChildrenUnmodifiableProperty()`
Returns an unmodfiable read-only property containing the content children.
`javafx.beans.property.ObjectProperty<Object>`
`contentProperty()`
A writable property representing the `IContentPart`'s content.
`void`
`detachFromContentAnchorage(Object contentAnchorage, String role)`
Detaches this part's content from the given contentAnchorage under the specified role, so that it will no longer be returned by subsequent calls to `getContentAnchoragesUnmodifiable()`.
`Object`
`getContent()`
Returns this part's content.
`ObservableSetMultimap<Object,String>`
`getContentAnchoragesUnmodifiable()`
Returns an unmodifiable `ObservableSetMultimap` that contains the content objects that are to be regarded as anchorages of this `IContentPart`'s content (`getContent()`) with an (optional) role qualifier for each anchorage-anchored link that has to be established.
`javafx.collections.ObservableList<Object>`
`getContentChildrenUnmodifiable()`
Returns an unmodifiable `ObservableList` that contains the content children.
`boolean`
`isFocusable()`
Returns `true` if policies and other parts of the application are allowed to assign focus to this part by changing the `FocusModel`.
`boolean`
`isSelectable()`
Returns `true` if policies and other parts of the application are allowed to add this part to the selection maintained by the `SelectionModel`.
`void`
`refreshContentAnchorages()`
Triggers a re-computation of the content anchorages of this `IContentPart`.
`void`
`refreshContentChildren()`
Triggers a re-computation of the content children of this `IContentPart`.
`void`
`removeContentChild(Object contentChild)`
Removes the given contentChild from this part's content children, so that it will no longer be returned by subsequent calls to `getContentChildrenUnmodifiable()`.
`void`
`reorderContentChild(Object contentChild, int newIndex)`
Rearranges the given contentChild to the new index position.
`void`
`setContent(Object content)`
Sets this part's content to the given `value`.

### Methods inherited from interface org.eclipse.gef.common.activate.IActivatable

`activate, activeProperty, deactivate, isActive`

### Methods inherited from interface org.eclipse.gef.common.adapt.IAdaptable

`adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapter`

### Methods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound

`adaptableProperty, getAdaptable, setAdaptable`

### Methods inherited from interface org.eclipse.gef.common.dispose.IDisposable

`dispose`

### Methods inherited from interface org.eclipse.gef.mvc.fx.parts.IVisualPart

`addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getRoot, getViewer, getVisual, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, removeChild, removeChildren, reorderChild, setParent, setRefreshVisual`

## Property Details

### contentAnchoragesUnmodifiable

ReadOnlySetMultimapProperty<Object,String> contentAnchoragesUnmodifiableProperty
Returns an unmodifiable read-only set-multimap property containing the content anchorages.

See Also:
  - `getContentAnchoragesUnmodifiable()`

### contentChildrenUnmodifiable

javafx.beans.property.ReadOnlyListProperty<Object> contentChildrenUnmodifiableProperty
Returns an unmodfiable read-only property containing the content children.

See Also:
  - `getContentChildrenUnmodifiable()`

### content

javafx.beans.property.ObjectProperty<Object> contentProperty
A writable property representing the `IContentPart`'s content.

See Also:
  - `getContent()`
  - `setContent(Object)`

## Field Details

### CONTENT_PROPERTY

static final String CONTENT_PROPERTY
Name of the `content property`.

See Also:
  - Constant Field Values

### CONTENT_CHILDREN_PROPERTY

static final String CONTENT_CHILDREN_PROPERTY
Name of the `contentChildrenUnmodifiableProperty()`.

See Also:
  - Constant Field Values

### CONTENT_ANCHORAGES_PROPERTY

static final String CONTENT_ANCHORAGES_PROPERTY
Name of the `contentAnchoragesUnmodifiableProperty()`.

See Also:
  - Constant Field Values

## Method Details

### addContentChild

void addContentChild(Object contentChild, int index)
Inserts the given contentChild as a child to this part's content, so that it will be returned by subsequent calls to `getContentChildrenUnmodifiable()`.

Parameters:
  `contentChild` - An `Object` which should be added as a child to this part's content.
  `index` - The index at which the contentChild should be added.

### attachToContentAnchorage

void attachToContentAnchorage(Object contentAnchorage, String role)
Attaches this part's content to the given contentAnchorage under the specified role, so that it will be returned by subsequent calls to `getContentAnchoragesUnmodifiable()`.

Parameters:
  `contentAnchorage` - An `Object` to which this part's content should be attached to.
  `role` - The role under which the attachment is to be established.

### contentAnchoragesUnmodifiableProperty

ReadOnlySetMultimapProperty<Object,String> contentAnchoragesUnmodifiableProperty()
Returns an unmodifiable read-only set-multimap property containing the content anchorages.

See Also:
  - `getContentAnchoragesUnmodifiable()`

### contentChildrenUnmodifiableProperty

javafx.beans.property.ReadOnlyListProperty<Object> contentChildrenUnmodifiableProperty()
Returns an unmodfiable read-only property containing the content children.

See Also:
  - `getContentChildrenUnmodifiable()`

### contentProperty

javafx.beans.property.ObjectProperty<Object> contentProperty()
A writable property representing the `IContentPart`'s content.

See Also:
  - `getContent()`
  - `setContent(Object)`

### detachFromContentAnchorage

void detachFromContentAnchorage(Object contentAnchorage, String role)
Detaches this part's content from the given contentAnchorage under the specified role, so that it will no longer be returned by subsequent calls to `getContentAnchoragesUnmodifiable()`.

Parameters:
  `contentAnchorage` - An `Object` from which this part's content should be detached from.
  `role` - The role under which the attachment is established.

### getContent

Object getContent()
Returns this part's content.

Returns:
  This part's content.

### getContentAnchoragesUnmodifiable

ObservableSetMultimap<Object,String> getContentAnchoragesUnmodifiable()
Returns an unmodifiable `ObservableSetMultimap` that contains the content objects that are to be regarded as anchorages of this `IContentPart`'s content (`getContent()`) with an (optional) role qualifier for each anchorage-anchored link that has to be established.

In case of a connection, one anchorage could have the "START" role, and another the "END" role. Using the role mechanism, the same anchorage may also have both roles, which can, for instance, be used for self connections.

Returns:
  An unmodifiable `ObservableSetMultimap` of the content anchorages with a role to qualify each anchorage-anchored link. If there is only a single anchorage-anchored link to a respective anchorage, its role may be left undefined (i.e. the map will contain an entry of the form (anchorage, `null`)).

### getContentChildrenUnmodifiable

javafx.collections.ObservableList<Object> getContentChildrenUnmodifiable()
Returns an unmodifiable `ObservableList` that contains the content children.

Returns:
  A `List` of all of this part's content children.

### isFocusable

boolean isFocusable()
Returns `true` if policies and other parts of the application are allowed to assign focus to this part by changing the `FocusModel`. Otherwise returns `false`.

Returns:
  `true` if policies and other parts of the application are allowed to assign focus to this part by changing the `FocusModel`, otherwise `false`.

### isSelectable

boolean isSelectable()
Returns `true` if policies and other parts of the application are allowed to add this part to the selection maintained by the `SelectionModel`. Otherwise returns `false`.

Returns:
  `true` if policies and other parts of the application are allowed to add this part to the selection maintained by the `SelectionModel`, otherwise `false`.

### refreshContentAnchorages

void refreshContentAnchorages()
Triggers a re-computation of the content anchorages of this `IContentPart`.

### refreshContentChildren

void refreshContentChildren()
Triggers a re-computation of the content children of this `IContentPart`.

### removeContentChild

void removeContentChild(Object contentChild)
Removes the given contentChild from this part's content children, so that it will no longer be returned by subsequent calls to `getContentChildrenUnmodifiable()`.

Parameters:
  `contentChild` - An `Object` which should be removed from this part's content children.

### reorderContentChild

void reorderContentChild(Object contentChild, int newIndex)
Rearranges the given contentChild to the new index position. Fires property change events using `CONTENT_CHILDREN_PROPERTY` as `property name`.

Parameters:
  `contentChild` - The `Object` which is to be reordered.
  `newIndex` - The index to which the content child is to be reordered.

### setContent

void setContent(Object content)
Sets this part's content to the given `value`. Fires property change events using `CONTENT_PROPERTY` as property name.

Parameters:
  `content` - The new content for this part.