VR - The visual root node of the UI toolkit this
AbstractContentPart is used in, e.g. javafx.scene.Node in
case of JavaFX.V - The visual node used by this AbstractContentPart.public abstract class AbstractContentPart<VR,V extends VR> extends AbstractVisualPart<VR,V> implements IContentPart<VR,V>
IContentPart, intended to be
sub-classed by clients to create their own custom IContentPart.IAdaptable.Bound<A extends IAdaptable>pcsCONTENT_ANCHORAGES_PROPERTY, CONTENT_CHILDREN_PROPERTY, CONTENT_PROPERTYANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTYADAPTERS_PROPERTYACTIVE_PROPERTY| Constructor and Description |
|---|
AbstractContentPart() |
| Modifier and Type | Method and Description |
|---|---|
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 to
IContentPart.getContentChildren(). |
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 to
IContentPart.getContentAnchorages(). |
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 to
IContentPart.getContentAnchorages(). |
protected void |
doAddContentChild(java.lang.Object contentChild,
int index)
Adds the given contentChild to this part's content children, so
that it will no longer be returned by subsequent calls to
IContentPart.getContentChildren(). |
protected void |
doAttachToContentAnchorage(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 to
IContentPart.getContentAnchorages(). |
protected void |
doDetachFromContentAnchorage(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 to
IContentPart.getContentAnchorages(). |
protected void |
doRemoveContentChild(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 to
IContentPart.getContentChildren(). |
protected void |
doReorderContentChild(java.lang.Object contentChild,
int newIndex)
Rearranges the given contentChild to the new index position.
|
java.lang.Object |
getContent()
Returns this part's content.
|
protected void |
register(IViewer<VR> viewer)
Called when a link to the Viewer is obtained.
|
protected void |
registerAtContentPartMap(IViewer<VR> viewer,
java.lang.Object content)
Registers the model in the
IViewer.getContentPartMap(). |
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 to
IContentPart.getContentChildren(). |
void |
reorderContentChild(java.lang.Object contentChild,
int newIndex)
Rearranges the given contentChild to the new index position.
|
void |
setContent(java.lang.Object content)
Set the primary model object that this EditPart represents.
|
protected void |
unregister(IViewer<VR> viewer)
Called when the link to the Viewer is lost.
|
protected void |
unregisterFromContentPartMap(IViewer<VR> viewer,
java.lang.Object content)
Unregisters the model in the
IViewer.getContentPartMap(). |
activate, addChild, addChild, addChildren, addChildren, addChildVisual, addPropertyChangeListener, attachAnchored, attachToAnchorage, attachToAnchorage, attachToAnchorageVisual, createVisual, deactivate, detachAnchored, detachFromAnchorage, detachFromAnchorage, detachFromAnchorageVisual, dispose, doActivate, doDeactivate, doRefreshVisual, getAdapter, getAdapter, getAdapter, getAdapters, getAdapters, getAnchorages, getAnchoreds, getBehaviors, getChildren, getParent, getPolicies, getRoot, getViewer, getVisual, isActive, isRefreshVisual, refreshVisual, registerAtVisualPartMap, removeChild, removeChildren, removeChildVisual, removePropertyChangeListener, reorderChild, setAdapter, setAdapter, setAdapter, setAdapter, setParent, setRefreshVisual, unregisterFromVisualPartMap, unsetAdapterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContentAnchorages, getContentChildrenaddChild, addChild, addChildren, addChildren, attachAnchored, attachToAnchorage, attachToAnchorage, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchorages, getAnchoreds, getBehaviors, getChildren, getParent, getPolicies, getRoot, getVisual, isRefreshVisual, refreshVisual, removeChild, removeChildren, reorderChild, setParent, setRefreshVisualgetAdapter, getAdapter, getAdapter, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapteractivate, deactivate, isActiveaddPropertyChangeListener, removePropertyChangeListenerdisposepublic final void addContentChild(java.lang.Object contentChild,
int index)
IContentPart.getContentChildren(). Fires property change events using
IContentPart.CONTENT_CHILDREN_PROPERTY as
property name.
Delegates to doAddContentChild(Object, int), which is to be
overwritten by subclasses.
addContentChild in interface IContentPart<VR,V extends VR>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.public final void attachToContentAnchorage(java.lang.Object contentAnchorage,
java.lang.String role)
IContentPart.getContentAnchorages(). Fires property change events
using IContentPart.CONTENT_ANCHORAGES_PROPERTY as
property name.
Delegates to doAttachToContentAnchorage(Object, String), which
is to be overwritten by subclasses.
attachToContentAnchorage in interface IContentPart<VR,V extends VR>contentAnchorage - An Object to which this part's content should be
attached to.role - The role under which the attachment is to be established.public final void detachFromContentAnchorage(java.lang.Object contentAnchorage,
java.lang.String role)
IContentPart.getContentAnchorages(). Fires property
change events using IContentPart.CONTENT_ANCHORAGES_PROPERTY as
property name.
Delegates to doDetachFromContentAnchorage(Object, String), which
is to be overwritten by subclasses.
detachFromContentAnchorage in interface IContentPart<VR,V extends VR>contentAnchorage - An Object from which this part's content should be
detached from.role - The role under which the attachment is established.protected void doAddContentChild(java.lang.Object contentChild,
int index)
IContentPart.getContentChildren().contentChild - An Object which should be removed from this part's
content children.index - The index of the contentChild that is removed.protected void doAttachToContentAnchorage(java.lang.Object contentAnchorage,
java.lang.String role)
IContentPart.getContentAnchorages().contentAnchorage - An Object to which this part's content should be
attached to.role - The role under which the attachment is to be established.protected void doDetachFromContentAnchorage(java.lang.Object contentAnchorage,
java.lang.String role)
IContentPart.getContentAnchorages().contentAnchorage - An Object from which this part's content should be
detached from.role - The role under which the attachment is established.protected void doRemoveContentChild(java.lang.Object contentChild)
IContentPart.getContentChildren().contentChild - An Object which should be removed from this part's
content children.protected void doReorderContentChild(java.lang.Object contentChild,
int newIndex)
contentChild - The Object which is to be reordered.newIndex - The index to which the content child is to be reordered.public java.lang.Object getContent()
IContentPartgetContent in interface IContentPart<VR,V extends VR>IContentPart.getContent()protected void register(IViewer<VR> viewer)
AbstractVisualPartregister in class AbstractVisualPart<VR,V extends VR>viewer - The viewer to register at.protected void registerAtContentPartMap(IViewer<VR> viewer, java.lang.Object content)
IViewer.getContentPartMap().
Subclasses should only extend this method if they need to register this
EditPart in additional ways.viewer - The viewer to register at.content - The content to register.public final void removeContentChild(java.lang.Object contentChild)
IContentPart.getContentChildren(). Fires property change events using
IContentPart.CONTENT_CHILDREN_PROPERTY as
property name.
Delegates to doRemoveContentChild(Object), which is to be
overwritten by subclasses.
removeContentChild in interface IContentPart<VR,V extends VR>contentChild - An Object which should be removed from this part's
content children.public void reorderContentChild(java.lang.Object contentChild,
int newIndex)
IContentPart.CONTENT_CHILDREN_PROPERTY as
property name.
Delegates to doReorderContentChild(Object, int), which is to be
overwritten by subclasses.
reorderContentChild in interface IContentPart<VR,V extends VR>contentChild - The Object which is to be reordered.newIndex - The index to which the content child is to be reordered.public void setContent(java.lang.Object content)
EditPartFactory when creating an EditPart.setContent in interface IContentPart<VR,V extends VR>content - The new content for this part.IContentPart.setContent(Object)protected void unregister(IViewer<VR> viewer)
AbstractVisualPartunregister in class AbstractVisualPart<VR,V extends VR>viewer - The viewer to unregister from.protected void unregisterFromContentPartMap(IViewer<VR> viewer, java.lang.Object content)
IViewer.getContentPartMap().
Subclasses should only extend this method if they need to unregister this
EditPart in additional ways.viewer - The viewer to unregister from.content - The content to unregister.Copyright (c) 2014 itemis AG and others. All rights reserved.