|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SequenceConstraintFactory
This interface specifies the general contract for factory classes that can be used to associate sequence constraints with a graph.
Sequence constraints affect the sequence of nodes within a layer
.
A SequenceConstraintFactory
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
.DataProvider
with key Layouter.NODE_ID_DPKEY
,
you must use the corresponding node IDs stored in this DataProvider
as arguments for
all methods that create a constraint. Otherwise, you can just use the node instances themselves.A graph laid out with IncrementalHierarchicLayouter with default settings. The labels indicate the desired placement of certain nodes relative to a reference node. | After defining appropriate sequence constraints and running the layout again, the labeled nodes now have their intended placement. |
Field Summary | |
---|---|
static java.lang.Object |
SEQUENCE_CONSTRAINTS_MEMENTO_DPKEY
A DataProvider key for storing the constraint graph
A v1 before v2 constraint is represented as an edge between the representatives of v1
and v2 in the constraint graph. |
Method Summary | |
---|---|
void |
addPlaceAfterConstraint(java.lang.Object referenceId,
java.lang.Object afterId)
Adds a constraint that forces the Node or Edge with id after to lie
after the Node or Edge with id reference . |
void |
addPlaceAtHeadConstraint(java.lang.Object id)
Adds a constraint that places a Node or Edge at the start of the sequence. |
void |
addPlaceAtTailConstraint(java.lang.Object id)
Adds a constraint that places a Node or Edge at the end of the sequence. |
void |
addPlaceBeforeConstraint(java.lang.Object referenceId,
java.lang.Object beforeId)
Adds a constraint that forces the Node or Edge with id before to lie
before the Node or Edge with id reference . |
void |
addPlaceNodeAfterConstraint(java.lang.Object referenceId,
java.lang.Object afterId)
Deprecated. Use addPlaceAfterConstraint(Object, Object) instead. |
void |
addPlaceNodeAtHeadConstraint(java.lang.Object nodeId)
Deprecated. Use addPlaceAtHeadConstraint(Object) instead. |
void |
addPlaceNodeAtTailConstraint(java.lang.Object nodeId)
Deprecated. Use addPlaceAtTailConstraint(Object) instead. |
void |
addPlaceNodeBeforeConstraint(java.lang.Object referenceId,
java.lang.Object beforeId)
Deprecated. Use addPlaceBeforeConstraint(Object, Object) instead. |
void |
dispose()
Disposes of the SequenceConstraintFactory . |
java.lang.Object |
getMemento()
Returns a token that allows to bind a constraint factory to a graph instance after creation. |
Field Detail |
---|
static final java.lang.Object SEQUENCE_CONSTRAINTS_MEMENTO_DPKEY
DataProvider
key for storing the constraint graph
A v1 before v2
constraint is represented as an edge between the representatives of v1
and v2
in the constraint graph.
Method Detail |
---|
java.lang.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.
HierarchicLayouter.createSequenceConstraintFactory(y.base.Graph)
void dispose()
SequenceConstraintFactory
.
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.
void addPlaceNodeBeforeConstraint(java.lang.Object referenceId, java.lang.Object beforeId)
addPlaceBeforeConstraint(Object, Object)
instead.
Node
with ID beforeId
to lie before
the Node
with ID referenceId
.
referenceId
- the ID of the reference nodebeforeId
- the ID of the node that should be placed before the reference nodeA graph laid out with IncrementalHierarchicLayouter with default settings. The labeled node should be placed before the reference node. | After defining an appropriate sequence constraint and running the layout again, the labeled node now lies before the reference node. |
void addPlaceNodeAfterConstraint(java.lang.Object referenceId, java.lang.Object afterId)
addPlaceAfterConstraint(Object, Object)
instead.
Node
with ID afterId
to lie after
the Node
with ID referenceId
.
referenceId
- the ID of the reference nodeafterId
- the ID of the node that should be placed after the reference nodeA graph laid out with IncrementalHierarchicLayouter with default settings. The labeled node should be placed after the reference node. | After defining an appropriate sequence constraint and running the layout again, the labeled node now lies after the reference node. |
void addPlaceNodeAtHeadConstraint(java.lang.Object nodeId)
addPlaceAtHeadConstraint(Object)
instead.
Node
at the start of the sequence.
nodeId
- the ID of the node that should be placed at the startA graph laid out with IncrementalHierarchicLayouter with default settings. The labeled node should be placed at the start of the layer. | After defining appropriate sequence constraints and running the layout again, the labeled node is now placed first in the layer. |
void addPlaceNodeAtTailConstraint(java.lang.Object nodeId)
addPlaceAtTailConstraint(Object)
instead.
Node
at the end of the sequence.
void addPlaceBeforeConstraint(java.lang.Object referenceId, java.lang.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 elementA graph laid out with IncrementalHierarchicLayouter with default settings. The labeled node should be placed before the reference node. | After defining an appropriate sequence constraint and running the layout again, the labeled node now lies before the reference node. |
void addPlaceAfterConstraint(java.lang.Object referenceId, java.lang.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 elementA graph laid out with IncrementalHierarchicLayouter with default settings. The labeled node should be placed after the reference node. | After defining an appropriate sequence constraint and running the layout again, the labeled node now lies after the reference node. |
void addPlaceAtHeadConstraint(java.lang.Object id)
Node
or Edge
at the start of the sequence.
recursive edge style
are ignored.id
- the ID of the node or edge that should be placed at the startA graph laid out with IncrementalHierarchicLayouter with default settings. The labeled node should be placed at the start of the layer. | After defining appropriate sequence constraints and running the layout again, the labeled node is now placed first in the layer. |
void addPlaceAtTailConstraint(java.lang.Object id)
Node
or Edge
at the end of the sequence.
recursive edge style
are ignored.id
- the ID of the node or edge that should be placed at the endA graph laid out with IncrementalHierarchicLayouter with default settings. The labeled node should be placed at the end of the layer. | After defining appropriate sequence constraints and running the layout again, the labeled node is now placed last in the layer. |
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |