VR
- The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public class ContentPolicy<VR> extends AbstractPolicy<VR> implements ITransactional
Constructor and Description |
---|
ContentPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
addContentChild(java.lang.Object contentChild,
int index)
Creates and records operations to add the given contentChild to
the
host of this ContentPolicy at the
specified index. |
void |
attachToContentAnchorage(java.lang.Object contentAnchorage,
java.lang.String role)
Creates and records operations to attach the
host of
this ContentPolicy to the specified contentAnchorage under
the specified role. |
IUndoableOperation |
commit() |
void |
deleteContent()
Creates and records operations to delete the
host of
this ContentPolicy from the content model, i.e. detaches all
content anchoreds, detaches from all content anchorages, and removes from
its parent's content children. |
void |
detachAllContentAnchoreds()
Creates and records operations to detach all content anchoreds from the
host of this ContentPolicy . |
void |
detachFromAllContentAnchorages()
Creates and records operations to detach the
host of
this ContentPolicy from all content anchorages. |
void |
detachFromContentAnchorage(java.lang.Object contentAnchorage,
java.lang.String role)
Creates and records operations to detach the
host of
this ContentPolicy from the specified contentAnchorage
under the specified role. |
IContentPart<VR,? extends VR> |
getHost()
|
void |
init() |
void |
removeContentChild(java.lang.Object contentChild)
Creates and records operations to remove the given contentChild
from the content children of the
host of this
ContentPolicy . |
void |
removeFromParent()
Creates and records operations to remove the content of this
ContentPolicy 's host from its parent. |
void |
setAdaptable(IVisualPart<VR,? extends VR> adaptable) |
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, init
public void addContentChild(java.lang.Object contentChild, int index)
host
of this ContentPolicy
at the
specified index.contentChild
- The content Object
that is to be added to the
host
of this ContentPolicy
.index
- The index of the new content child.public void attachToContentAnchorage(java.lang.Object contentAnchorage, java.lang.String role)
host
of
this ContentPolicy
to the specified contentAnchorage under
the specified role.contentAnchorage
- The content Object
to which the host
of this ContentPolicy
is to be attached.role
- The role for the attachment.public IUndoableOperation commit()
commit
in interface ITransactional
public void deleteContent()
host
of
this ContentPolicy
from the content model, i.e. detaches all
content anchoreds, detaches from all content anchorages, and removes from
its parent's content children.public void detachAllContentAnchoreds()
host
of this ContentPolicy
.public void detachFromAllContentAnchorages()
host
of
this ContentPolicy
from all content anchorages.public void detachFromContentAnchorage(java.lang.Object contentAnchorage, java.lang.String role)
host
of
this ContentPolicy
from the specified contentAnchorage
under the specified role.contentAnchorage
- The content Object
from which the getHost()
of this ContentPolicy
is detached.role
- The role under which the anchorage is detached.public IContentPart<VR,? extends VR> getHost()
IPolicy
public void init()
init
in interface ITransactional
public void removeContentChild(java.lang.Object contentChild)
host
of this
ContentPolicy
.contentChild
- The content Object
that is removed from content
children of the host
of this
ContentPolicy
.public void removeFromParent()
ContentPolicy
's host
from its parent.public void setAdaptable(IVisualPart<VR,? extends VR> adaptable)
setAdaptable
in interface IAdaptable.Bound<IVisualPart<VR,? extends VR>>
setAdaptable
in class AbstractPolicy<VR>
Copyright (c) 2014 itemis AG and others. All rights reserved.