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
public interface IContentPart<V extends javafx.scene.Node> extends IVisualPart<V>
AnIVisualPartthat visualizes an underlying content element.- Noimplement:
- This interface is not intended to be implemented by clients.
Instead,
AbstractContentPartshould be sub-classed.
-
-
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 java.lang.StringCONTENT_ANCHORAGES_PROPERTYName of thecontentAnchoragesUnmodifiableProperty().static java.lang.StringCONTENT_CHILDREN_PROPERTYName of thecontentChildrenUnmodifiableProperty().static java.lang.StringCONTENT_PROPERTYName 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddContentChild(java.lang.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().voidattachToContentAnchorage(java.lang.Object contentAnchorage, java.lang.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().ReadOnlySetMultimapProperty<java.lang.Object,java.lang.String>contentAnchoragesUnmodifiableProperty()Returns an unmodifiable read-only set-multimap property containing the content anchorages.javafx.beans.property.ReadOnlyListProperty<java.lang.Object>contentChildrenUnmodifiableProperty()Returns an unmodfiable read-only property containing the content children.javafx.beans.property.ObjectProperty<java.lang.Object>contentProperty()A writable property representing theIContentPart's content.voiddetachFromContentAnchorage(java.lang.Object contentAnchorage, java.lang.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().java.lang.ObjectgetContent()Returns this part's content.ObservableSetMultimap<java.lang.Object,java.lang.String>getContentAnchoragesUnmodifiable()Returns an unmodifiableObservableSetMultimapthat 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<java.lang.Object>getContentChildrenUnmodifiable()Returns an unmodifiableObservableListthat contains the content children.booleanisFocusable()Returnstrueif policies and other parts of the application are allowed to assign focus to this part by changing theFocusModel.booleanisSelectable()Returnstrueif policies and other parts of the application are allowed to add this part to the selection maintained by theSelectionModel.voidrefreshContentAnchorages()Triggers a re-computation of the content anchorages of thisIContentPart.voidrefreshContentChildren()Triggers a re-computation of the content children of thisIContentPart.voidremoveContentChild(java.lang.Object contentChild)Removes the given contentChild from this part's content children, so that it will no longer be returned by subsequent calls togetContentChildrenUnmodifiable().voidreorderContentChild(java.lang.Object contentChild, int newIndex)Rearranges the given contentChild to the new index position.voidsetContent(java.lang.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
-
-
-
-
Field Detail
-
CONTENT_PROPERTY
static final java.lang.String CONTENT_PROPERTY
Name of thecontent property.- See Also:
- Constant Field Values
-
CONTENT_CHILDREN_PROPERTY
static final java.lang.String CONTENT_CHILDREN_PROPERTY
Name of thecontentChildrenUnmodifiableProperty().- See Also:
- Constant Field Values
-
CONTENT_ANCHORAGES_PROPERTY
static final java.lang.String CONTENT_ANCHORAGES_PROPERTY
Name of thecontentAnchoragesUnmodifiableProperty().- See Also:
- Constant Field Values
-
-
Method Detail
-
addContentChild
void addContentChild(java.lang.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().- Parameters:
contentChild- AnObjectwhich should be added as a child to this part's content.index- The index at which the contentChild should be added.
-
attachToContentAnchorage
void attachToContentAnchorage(java.lang.Object contentAnchorage, java.lang.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().- Parameters:
contentAnchorage- AnObjectto which this part's content should be attached to.role- The role under which the attachment is to be established.
-
contentAnchoragesUnmodifiableProperty
ReadOnlySetMultimapProperty<java.lang.Object,java.lang.String> contentAnchoragesUnmodifiableProperty()
Returns an unmodifiable read-only set-multimap property containing the content anchorages.- Returns:
- An unmodifiable read-only set-multimap property.
- See Also:
getContentAnchoragesUnmodifiable(),attachToContentAnchorage(Object, String),detachFromContentAnchorage(Object, String)
-
contentChildrenUnmodifiableProperty
javafx.beans.property.ReadOnlyListProperty<java.lang.Object> contentChildrenUnmodifiableProperty()
Returns an unmodfiable read-only property containing the content children.- Returns:
- An unmodifiable read-only property named
CONTENT_CHILDREN_PROPERTY.
-
contentProperty
javafx.beans.property.ObjectProperty<java.lang.Object> contentProperty()
A writable property representing theIContentPart's content.- Returns:
- A writable property named
CONTENT_PROPERTY.
-
detachFromContentAnchorage
void detachFromContentAnchorage(java.lang.Object contentAnchorage, java.lang.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().- Parameters:
contentAnchorage- AnObjectfrom which this part's content should be detached from.role- The role under which the attachment is established.
-
getContent
java.lang.Object getContent()
Returns this part's content.- Returns:
- This part's content.
-
getContentAnchoragesUnmodifiable
ObservableSetMultimap<java.lang.Object,java.lang.String> getContentAnchoragesUnmodifiable()
Returns an unmodifiableObservableSetMultimapthat 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
ObservableSetMultimapof 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<java.lang.Object> getContentChildrenUnmodifiable()
Returns an unmodifiableObservableListthat contains the content children.- Returns:
- A
Listof all of this part's content children.
-
isFocusable
boolean isFocusable()
Returnstrueif policies and other parts of the application are allowed to assign focus to this part by changing theFocusModel. Otherwise returnsfalse.- Returns:
trueif policies and other parts of the application are allowed to assign focus to this part by changing theFocusModel, otherwisefalse.
-
isSelectable
boolean isSelectable()
Returnstrueif policies and other parts of the application are allowed to add this part to the selection maintained by theSelectionModel. Otherwise returnsfalse.- Returns:
trueif 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
void removeContentChild(java.lang.Object contentChild)
Removes the given contentChild from this part's content children, so that it will no longer be returned by subsequent calls togetContentChildrenUnmodifiable().- Parameters:
contentChild- AnObjectwhich should be removed from this part's content children.
-
reorderContentChild
void reorderContentChild(java.lang.Object contentChild, int newIndex)Rearranges the given contentChild to the new index position. Fires property change events usingCONTENT_CHILDREN_PROPERTYasproperty name.- Parameters:
contentChild- TheObjectwhich is to be reordered.newIndex- The index to which the content child is to be reordered.
-
setContent
void setContent(java.lang.Object content)
Sets this part's content to the givenvalue. Fires property change events usingCONTENT_PROPERTYas property name.- Parameters:
content- The new content for this part.
-
-