VR - The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public class CreationPolicy<VR> extends AbstractPolicy<VR> implements ITransactional
CreationPolicy is an ITransactional
AbstractPolicy that handles the creation of new content objects via
the ContentPolicy.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
initialized
Stores the initialized flag for this policy, i.e.
|
| Constructor and Description |
|---|
CreationPolicy() |
| Modifier and Type | Method and Description |
|---|---|
IUndoableOperation |
commit()
Returns an
IUndoableOperation that performs all manipulations
applied by the policy since the last ITransactional.init() call. |
void |
create(IContentPart<VR,? extends VR> parent,
java.lang.Object content)
Adds the given content to the collection of to-be-created contents
in the specified parent.
|
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, getHost, init, setAdaptablepublic IUndoableOperation commit()
ITransactionalIUndoableOperation that performs all manipulations
applied by the policy since the last ITransactional.init() call. When called
multiple times in sequence, only the first call will yield an operation,
the subsequent calls will yield null.commit in interface ITransactionalIUndoableOperation that performs all manipulations
applied by the policy since the last ITransactional.init() call.public void create(IContentPart<VR,? extends VR> parent, java.lang.Object content)
parent - The IContentPart where the content is inserted.content - The Object to be created as a content-child of the
given parent.public void init()
ITransactionalIllegalStateException. It is safe to call ITransactional.init()
multiple times in sequence.init in interface ITransactionalCopyright (c) 2014 itemis AG and others. All rights reserved.