|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SequenceConstraintFactory
Specifies the general contract for factory classes that can be used to associate sequence constraints to a graph. Sequence constraints affect the per layer sequence calculated in hierarchical layouts.
A SequenceConstraintFactory
has to be
disposed
after use. Disposing the factory will also remove
all constraints previously specified for the factory's associated graph.
Layouter.NODE_ID_DPKEY
on the graph, 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.
Field Summary | |
---|---|
static Object |
SEQUENCE_CONSTRAINTS_MEMENTO_DPKEY
DataProvider key to store the constraint graph. |
Method Summary | |
---|---|
void |
addPlaceNodeAfterConstraint(Object referenceId,
Object afterId)
Add a constraint that forces the node with id after to lie after
the node with id reference . |
void |
addPlaceNodeAtHeadConstraint(Object nodeId)
Add a constraint that places a node at the start of the sequence. |
void |
addPlaceNodeAtTailConstraint(Object nodeId)
Add a constraint that places a node at the end of the sequence. |
void |
addPlaceNodeBeforeConstraint(Object referenceId,
Object beforeId)
Add a constraint that forces the node with id before to lie before
the node with id reference . |
void |
dispose()
Disposes the SequenceConstraintFactory. |
Object |
getMemento()
Get a token that allows to bind a constraint factory to a graph instance after creation. |
Field Detail |
---|
static final Object SEQUENCE_CONSTRAINTS_MEMENTO_DPKEY
DataProvider
key to store 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 |
---|
Object getMemento()
HierarchicLayouter.createSequenceConstraintFactory(y.base.Graph)
void dispose()
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(Object referenceId, Object beforeId)
before
to lie before
the node with id reference
.
referenceId
- the id of the reference nodebeforeId
- the id of the node that should be placed before the referencevoid addPlaceNodeAfterConstraint(Object referenceId, Object afterId)
after
to lie after
the node with id reference
.
referenceId
- the id of the reference nodeafterId
- the id of the node that should be placed after the referencevoid addPlaceNodeAtHeadConstraint(Object nodeId)
nodeId
- the id of the node that should be placed at the startvoid addPlaceNodeAtTailConstraint(Object nodeId)
nodeId
- the id of the node that should be placed at the end
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |