public interface ISequenceConstraintFactory
Sequence constraints affect the sequence of nodes within a layer
.
A ISequenceConstraintFactory
has to be disposed of
after use. Disposing of the factory will
also remove all constraints previously specified for the factory's associated graph.
swimlanes
.IDataProvider
with key
LayoutKeys.NODE_ID_DPKEY
, you must use the corresponding node IDs stored in this IDataProvider
as arguments for all methods that create a constraint. Otherwise, you can just use the node instances themselves.
Modifier and Type | Method and Description |
---|---|
void |
addPlaceAfterConstraint(Object referenceId,
Object afterId)
|
void |
addPlaceAtHeadConstraint(Object id)
|
void |
addPlaceAtTailConstraint(Object id)
|
void |
addPlaceBeforeConstraint(Object referenceId,
Object beforeId)
|
void |
dispose()
Disposes of the
ISequenceConstraintFactory . |
Object |
getMemento()
Gets a token that allows to bind a constraint factory to a graph instance after creation.
|
void addPlaceAfterConstraint(Object referenceId, Object afterId)
Node
or Edge
with id after
to lie after the Node
or Edge
with id reference
.referenceId
- the ID of the reference node or edgeafterId
- the ID of the node or edge that should be placed after the reference elementvoid addPlaceAtHeadConstraint(Object id)
recursive edge style
are ignored.id
- the ID of the node or edge that should be placed at the startvoid addPlaceAtTailConstraint(Object id)
recursive edge style
are ignored.id
- the ID of the node or edge that should be placed at the endvoid addPlaceBeforeConstraint(Object referenceId, Object beforeId)
Node
or Edge
with id before
to lie before the Node
or Edge
with id reference
.referenceId
- the ID of the reference node or edgebeforeId
- the ID of the node or edge that should be placed before the reference elementvoid dispose()
ISequenceConstraintFactory
.
This method should be called when the factory is not needed anymore, i.e. after the layout has been calculated. Calling this method also clears all constraints.
Object getMemento()
This method should only be used if the constraint factory is not bound to a graph instance initially. It allows to bind this factory to a graph instance after creation.
HierarchicLayoutCore.createSequenceConstraintFactory(com.yworks.yfiles.algorithms.Graph)