|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LayerConstraintFactory
Interface specification for classes that can create layering constraints.
If you manually register a DataProvider underLayouter.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 |
LAYER_CONSTRAINTS_MEMENTO_DPKEY
DataProvider key to store the constraints. |
Method Summary | |
---|---|
LayerConstraint |
addPlaceNodeAboveConstraint(Object referenceId,
Object aboveId)
Add a constraint that forces the node above to lie above the node reference . |
LayerConstraint |
addPlaceNodeAboveConstraint(Object referenceId,
Object aboveId,
int minDistance)
Add a constraint that forces the node with id above to lie at least minDistance layers
above the node with id reference . |
LayerConstraint |
addPlaceNodeAboveConstraint(Object referenceId,
Object aboveId,
int minDistance,
int weight)
Add a constraint that forces the node with id above to lie at least minDistance layers
above the node with id reference with a given weight penalty for larger layer differences. |
LayerConstraint |
addPlaceNodeAtBottomConstraint(Object nodeId)
Add a constraint that places a node in the bottom layer |
LayerConstraint |
addPlaceNodeAtTopConstraint(Object nodeId)
Add a constraint that places a node in the topmost layer |
LayerConstraint |
addPlaceNodeBelowConstraint(Object referenceId,
Object belowId)
Add a constraint that forces the node with id with id below to lie below the node with id
reference . |
LayerConstraint |
addPlaceNodeBelowConstraint(Object referenceId,
Object belowId,
int minDistance)
Add a constraint that forces the node with id below to lie at least minDistance layers
below the node with id reference . |
LayerConstraint |
addPlaceNodeBelowConstraint(Object referenceId,
Object belowId,
int minDistance,
int weight)
Add a constraint that forces the node with id below to lie at least minDistance layers
below the node with id reference with a given weight penalty for larger layer differences. |
LayerConstraint |
addPlaceNodeInSameLayerConstraint(Object referenceId,
Object sameLayerId)
Add a constraint that forces the node with id sameLayer to lie in the same layer as the node with id
reference . |
void |
dispose()
Disposes the ConstraintFactory. |
Object |
getMemento()
Get a token that allows to bind a constraint factory to a graph instance after creation. |
void |
removeConstraints(Object nodeId)
Clears all constraints for a given node |
Field Detail |
---|
static final Object LAYER_CONSTRAINTS_MEMENTO_DPKEY
DataProvider
key to store the constraints.
Method Detail |
---|
Object getMemento()
ConstraintLayerer.createConstraintFactory(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.
LayerConstraint addPlaceNodeBelowConstraint(Object referenceId, Object belowId)
below
to lie below the node with id
reference
.
referenceId
- the id of the reference nodebelowId
- the id of the node that should lie below
LayerConstraint
LayerConstraint addPlaceNodeBelowConstraint(Object referenceId, Object belowId, int minDistance)
below
to lie at least minDistance
layers
below the node with id reference
.
The minimum distance includes potentially empty layers that are removed by the layerer. In that case, the actual
layer difference may be smaller than minDistance
referenceId
- the id of the reference nodebelowId
- the id of the node that should lie belowminDistance
- the minimal layer distance between the node and its reference node
LayerConstraint
LayerConstraint addPlaceNodeBelowConstraint(Object referenceId, Object belowId, int minDistance, int weight)
below
to lie at least minDistance
layers
below the node with id reference
with a given weight penalty for larger layer differences.
The minimum distance includes potentially empty layers that are removed by the layerer. In that case, the actual
layer difference may be smaller than minDistance
referenceId
- the id of the reference nodebelowId
- the id of the node that should lie belowminDistance
- the minimal layer distance between the node and its reference nodeweight
- the weight penalty for larger layer differences
LayerConstraint
LayerConstraint addPlaceNodeAboveConstraint(Object referenceId, Object aboveId)
above
to lie above the node reference
.
referenceId
- the id of the reference nodeaboveId
- the id of the node that should lie above
LayerConstraint
LayerConstraint addPlaceNodeAboveConstraint(Object referenceId, Object aboveId, int minDistance)
above
to lie at least minDistance
layers
above the node with id reference
.
The minimum distance includes potentially empty layers that are removed by the layerer. In that case, the actual
layer difference may be smaller than minDistance
referenceId
- the id of the reference nodeaboveId
- the id of the node that should lie aboveminDistance
- the minimal layer distance between the node and its reference node
LayerConstraint
LayerConstraint addPlaceNodeAboveConstraint(Object referenceId, Object aboveId, int minDistance, int weight)
above
to lie at least minDistance
layers
above the node with id reference
with a given weight penalty for larger layer differences.
The minimum distance includes potentially empty layers that are removed by the layerer. In that case, the actual
layer difference may be smaller than minDistance
referenceId
- the id of the reference nodeaboveId
- the id of the node that should lie aboveminDistance
- the minimal layer distance between the node and its reference nodeweight
- the weight penalty for larger layer differences
LayerConstraint
LayerConstraint addPlaceNodeInSameLayerConstraint(Object referenceId, Object sameLayerId)
sameLayer
to lie in the same layer as the node with id
reference
.
referenceId
- the id of the reference nodesameLayerId
- the id of the node that should lie in the same layer
LayerConstraint
LayerConstraint addPlaceNodeAtTopConstraint(Object nodeId)
nodeId
- the id of the node that should lie at the top
LayerConstraint
LayerConstraint addPlaceNodeAtBottomConstraint(Object nodeId)
nodeId
- the id of the node that should lie at the bottom
LayerConstraint
void removeConstraints(Object nodeId)
nodeId
- the id of the node for which all constraints should be clearedLayerConstraint
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |