Package org.eclipse.gef.mvc.fx.parts
Interface IContentPart<V extends javafx.scene.Node>
- Type Parameters:
V
- The visual node used by thisIContentPart
.
- All Superinterfaces:
IActivatable
,IAdaptable
,IAdaptable.Bound<IViewer>
,IDisposable
,IVisualPart<V>
- All Known Subinterfaces:
IBendableContentPart<V>
,IResizableContentPart<V>
,ITransformableContentPart<V>
- All Known Implementing Classes:
AbstractContentPart
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
TypePropertyDescriptionReturns an unmodifiable read-only set-multimap property containing the content anchorages.javafx.beans.property.ReadOnlyListProperty<Object>
Returns an unmodfiable read-only property containing the content children.javafx.beans.property.ObjectProperty<Object>
A writable property representing theIContentPart
'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
Modifier and TypeFieldDescriptionstatic final String
Name of thecontentAnchoragesUnmodifiableProperty()
.static final String
Name of thecontentChildrenUnmodifiableProperty()
.static final String
Name of thecontent 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 TypeMethodDescriptionvoid
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 togetContentChildrenUnmodifiable()
.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 togetContentAnchoragesUnmodifiable()
.Returns an unmodifiable read-only set-multimap property containing the content anchorages.javafx.beans.property.ReadOnlyListProperty<Object>
Returns an unmodfiable read-only property containing the content children.javafx.beans.property.ObjectProperty<Object>
A writable property representing theIContentPart
'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 togetContentAnchoragesUnmodifiable()
.Returns this part's content.Returns an unmodifiableObservableSetMultimap
that contains the content objects that are to be regarded as anchorages of thisIContentPart
's content (getContent()
) with an (optional) role qualifier for each anchorage-anchored link that has to be established.javafx.collections.ObservableList<Object>
Returns an unmodifiableObservableList
that contains the content children.boolean
Returnstrue
if policies and other parts of the application are allowed to assign focus to this part by changing theFocusModel
.boolean
Returnstrue
if policies and other parts of the application are allowed to add this part to the selection maintained by theSelectionModel
.void
Triggers a re-computation of the content anchorages of thisIContentPart
.void
Triggers a re-computation of the content children of thisIContentPart
.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 togetContentChildrenUnmodifiable()
.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 givenvalue
.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> contentAnchoragesUnmodifiablePropertyReturns an unmodifiable read-only set-multimap property containing the content anchorages.- See Also:
-
contentChildrenUnmodifiable
javafx.beans.property.ReadOnlyListProperty<Object> contentChildrenUnmodifiablePropertyReturns an unmodfiable read-only property containing the content children.- See Also:
-
content
javafx.beans.property.ObjectProperty<Object> contentPropertyA writable property representing theIContentPart
's content.- See Also:
-
-
Field Details
-
CONTENT_PROPERTY
Name of thecontent property
.- See Also:
-
CONTENT_CHILDREN_PROPERTY
Name of thecontentChildrenUnmodifiableProperty()
.- See Also:
-
CONTENT_ANCHORAGES_PROPERTY
Name of thecontentAnchoragesUnmodifiableProperty()
.- See Also:
-
-
Method Details
-
addContentChild
Inserts the given contentChild as a child to this part's content, so that it will be returned by subsequent calls togetContentChildrenUnmodifiable()
.- Parameters:
contentChild
- AnObject
which should be added as a child to this part's content.index
- The index at which the contentChild should be added.
-
attachToContentAnchorage
Attaches this part's content to the given contentAnchorage under the specified role, so that it will be returned by subsequent calls togetContentAnchoragesUnmodifiable()
.- Parameters:
contentAnchorage
- AnObject
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:
-
contentChildrenUnmodifiableProperty
javafx.beans.property.ReadOnlyListProperty<Object> contentChildrenUnmodifiableProperty()Returns an unmodfiable read-only property containing the content children.- See Also:
-
contentProperty
javafx.beans.property.ObjectProperty<Object> contentProperty()A writable property representing theIContentPart
's content.- See Also:
-
detachFromContentAnchorage
Detaches this part's content from the given contentAnchorage under the specified role, so that it will no longer be returned by subsequent calls togetContentAnchoragesUnmodifiable()
.- Parameters:
contentAnchorage
- AnObject
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 unmodifiableObservableSetMultimap
that contains the content objects that are to be regarded as anchorages of thisIContentPart
'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 unmodifiableObservableList
that contains the content children.- Returns:
- A
List
of all of this part's content children.
-
isFocusable
boolean isFocusable()Returnstrue
if policies and other parts of the application are allowed to assign focus to this part by changing theFocusModel
. Otherwise returnsfalse
.- Returns:
true
if policies and other parts of the application are allowed to assign focus to this part by changing theFocusModel
, otherwisefalse
.
-
isSelectable
boolean isSelectable()Returnstrue
if policies and other parts of the application are allowed to add this part to the selection maintained by theSelectionModel
. Otherwise returnsfalse
.- Returns:
true
if policies and other parts of the application are allowed to add this part to the selection maintained by theSelectionModel
, otherwisefalse
.
-
refreshContentAnchorages
void refreshContentAnchorages()Triggers a re-computation of the content anchorages of thisIContentPart
. -
refreshContentChildren
void refreshContentChildren()Triggers a re-computation of the content children of thisIContentPart
. -
removeContentChild
Removes the given contentChild from this part's content children, so that it will no longer be returned by subsequent calls togetContentChildrenUnmodifiable()
.- Parameters:
contentChild
- AnObject
which should be removed from this part's content children.
-
reorderContentChild
Rearranges the given contentChild to the new index position. Fires property change events usingCONTENT_CHILDREN_PROPERTY
asproperty name
.- Parameters:
contentChild
- TheObject
which is to be reordered.newIndex
- The index to which the content child is to be reordered.
-
setContent
Sets this part's content to the givenvalue
. Fires property change events usingCONTENT_PROPERTY
as property name.- Parameters:
content
- The new content for this part.
-