VR
- The visual root node of the UI toolkit this IContentPart
is used in, e.g. javafx.scene.Node in case of JavaFX.V
- The visual node used by this IContentPart
.public interface IContentPart<VR,V extends VR> extends IVisualPart<VR,V>
IVisualPart
that visualizes an underlying content element.AbstractContentPart
should be sub-classed.IAdaptable.Bound<A extends IAdaptable>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTENT_PROPERTY
Property name used within
PropertyChangeEvent s, which are fired
whenever the content changes (setContent(Object) ). |
ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY
ADAPTERS_PROPERTY
ACTIVE_PROPERTY
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
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
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
getContentAnchorages() . |
java.lang.Object |
getContent()
Returns this part's content.
|
com.google.common.collect.SetMultimap<? extends java.lang.Object,java.lang.String> |
getContentAnchorages()
Returns 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. |
java.util.List<? extends java.lang.Object> |
getContentChildren()
Returns a
List of all of this part's content children. |
void |
removeContentChild(java.lang.Object contentChild,
int index)
Removes the given contentChild from this part's content children,
so that it will no longer be returned by subsequent calls to
getContentChildren() . |
void |
setContent(java.lang.Object content)
Sets this part's content to the given
value . |
addAnchorage, addAnchorage, addAnchored, addChild, addChild, addChildren, addChildren, getAnchorages, getAnchoreds, getBehaviors, getChildren, getParent, getPolicies, getRoot, getVisual, isRefreshVisual, refreshVisual, removeAnchorage, removeAnchorage, removeAnchored, removeChild, removeChildren, reorderChild, setParent, setRefreshVisual
getAdapter, getAdapter, getAdapter, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, unsetAdapter
activate, deactivate, isActive
addPropertyChangeListener, removePropertyChangeListener
dispose
static final java.lang.String CONTENT_PROPERTY
PropertyChangeEvent
s, which are fired
whenever the content changes (setContent(Object)
).void addContentChild(java.lang.Object contentChild, int index)
getContentChildren()
.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.void attachToContentAnchorage(java.lang.Object contentAnchorage, java.lang.String role)
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.void detachFromContentAnchorage(java.lang.Object contentAnchorage, java.lang.String role)
getContentAnchorages()
.contentAnchorage
- An Object
from which this part's content should be
detached from.role
- The role under which the attachment is established.java.lang.Object getContent()
com.google.common.collect.SetMultimap<? extends java.lang.Object,java.lang.String> getContentAnchorages()
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.
SetMultimap
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
)).java.util.List<? extends java.lang.Object> getContentChildren()
List
of all of this part's content children.List
of all of this part's content children.void removeContentChild(java.lang.Object contentChild, int index)
getContentChildren()
.contentChild
- An Object
which should be removed from this part's
content children.index
- The index of the contentChild that is removed.void setContent(java.lang.Object content)
value
.content
- The new content for this part.Copyright (c) 2014 itemis AG and others. All rights reserved.