N
- the type of child node in usepublic interface MutableOutline<N extends MutableOutlineNode<N>> extends Outline<N>, MutableOutlineNode<N>
Outline
s which are mutable. Mutable outlines hold
MutableOutlineNode
s as their child nodes. Via getLock()
, this class also offers
a lock that might have to be acquired, depending on the implementation.
In addition to mutability, implementations of this interface also offer a listener mechanism.
Using instances of MutableOutline.OutlineListener
, it is possible to receive notifications whenever a
node is added, removed or changed.
Modifier and Type | Interface and Description |
---|---|
static interface |
MutableOutline.OutlineListener<N extends MutableOutlineNode<?>>
A listener to be notified of changes to any node within the Outline Tree.
|
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_DESCRIPTION
Property name for property change events which signal that a node's description was changed.
|
static String |
PROPERTY_INSTRUCTIONS
Property name for property change events which signal that a node's instructions were changed
or replaced.
|
static String |
PROPERTY_PREFIX_USER_PROPERTY
Intended as a property name prefix for property change events that pertain to user properties.
|
Modifier and Type | Method and Description |
---|---|
void |
addOutlineListener(MutableOutline.OutlineListener<N> outlineListener)
Add an
MutableOutline.OutlineListener to be notified of changes to this Outline Tree. |
ReadWriteLock |
getLock()
Return the
ReadWriteLock which must be acquired during all modifications and read
actions on any node within this Outline Tree. |
void |
removeOutlineListener(MutableOutline.OutlineListener<N> outlineListener)
Remove an
MutableOutline.OutlineListener from this outline. |
getChildren, getOutline, getProperties, setDescription, setInstructionChain
getDescription, getInstructionChain, getParent
static final String PROPERTY_DESCRIPTION
static final String PROPERTY_INSTRUCTIONS
static final String PROPERTY_PREFIX_USER_PROPERTY
void addOutlineListener(MutableOutline.OutlineListener<N> outlineListener)
MutableOutline.OutlineListener
to be notified of changes to this Outline Tree.outlineListener
- the listener to be addedvoid removeOutlineListener(MutableOutline.OutlineListener<N> outlineListener)
MutableOutline.OutlineListener
from this outline. This method does nothing if the listener
has not previously been registered using addOutlineListener(OutlineListener)
.outlineListener
- the listener to be removedReadWriteLock getLock()
ReadWriteLock
which must be acquired during all modifications and read
actions on any node within this Outline Tree. Failing to acquired a lock during modifications
may cause those modifications to conflict with others or lead to them being improperly
reflected in the UI.Copyright © 2024 levigo holding gmbh. All rights reserved.