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,
AbstractContentPartshould be sub-classed.
-
Property Summary
PropertiesTypePropertyDescriptionReturns 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
activeProperties inherited from interface org.eclipse.gef.common.adapt.IAdaptable
adaptersProperties inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptableProperties 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
FieldsModifier and TypeFieldDescriptionstatic final StringName of thecontentAnchoragesUnmodifiableProperty().static final StringName of thecontentChildrenUnmodifiableProperty().static final StringName of thecontent property.Fields inherited from interface org.eclipse.gef.common.activate.IActivatable
ACTIVE_PROPERTYFields inherited from interface org.eclipse.gef.common.adapt.IAdaptable
ADAPTERS_PROPERTYFields 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 TypeMethodDescriptionvoidaddContentChild(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(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.voiddetachFromContentAnchorage(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 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<Object>Returns an unmodifiableObservableListthat contains the content children.booleanReturnstrueif policies and other parts of the application are allowed to assign focus to this part by changing theFocusModel.booleanReturnstrueif policies and other parts of the application are allowed to add this part to the selection maintained by theSelectionModel.voidTriggers a re-computation of the content anchorages of thisIContentPart.voidTriggers a re-computation of the content children of thisIContentPart.voidremoveContentChild(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(Object contentChild, int newIndex) Rearranges the given contentChild to the new index position.voidsetContent(Object content) Sets this part's content to the givenvalue.Methods inherited from interface org.eclipse.gef.common.activate.IActivatable
activate, activeProperty, deactivate, isActiveMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptable
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapterMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptableProperty, getAdaptable, setAdaptableMethods inherited from interface org.eclipse.gef.common.dispose.IDisposable
disposeMethods 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- AnObjectwhich 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- AnObjectto 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- AnObjectfrom 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 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<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
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
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
Sets this part's content to the givenvalue. Fires property change events usingCONTENT_PROPERTYas property name.- Parameters:
content- The new content for this part.
-