|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.incremental.ConstraintIncrementalLayerer
public class ConstraintIncrementalLayerer
Layerer implementation that observes relative and absolute layering constraints defined by the layering constraint
factory LayerConstraintFactory.
For a given graph instance, this factory can be created with method
IncrementalHierarchicLayouter.createLayerConstraintFactory(y.base.Graph).
The Layerer can be used for both common layering and layering of incremental nodes.
LayerConstraintFactory,
IncrementalHierarchicLayouter
| Field Summary | |
|---|---|
static String |
EDGE_WEIGHTS_DPKEY
DataProvider key for additional edge weights of type int. |
| Constructor Summary | |
|---|---|
ConstraintIncrementalLayerer(Layerer coreLayerer)
|
|
| Method Summary | |
|---|---|
void |
assignLayers(LayoutGraph g,
Layers layers,
LayoutDataProvider ldp)
Calculates a layering for the given graph. |
protected void |
checkConstraints()
Checks if the current set of strong constraints is consistent (i.e. has no cycles) |
boolean |
isAllowSameLayerEdges()
Returns whether same layer edges can be created by this layerer instance. |
void |
setAllowSameLayerEdges(boolean allowSameLayerEdges)
Set whether same layer edges can be created by this layerer instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EDGE_WEIGHTS_DPKEY
int.
The Layerer tries to keep edges with higher weights short.
| Constructor Detail |
|---|
public ConstraintIncrementalLayerer(Layerer coreLayerer)
| Method Detail |
|---|
public boolean isAllowSameLayerEdges()
This only concerns edges between nodes that have no hard constraints that will force a same layer edge (i.e. a same layer constraint).
Default value is false.
public void setAllowSameLayerEdges(boolean allowSameLayerEdges)
This only concerns edges between nodes that have no hard constraints that will force a same layer edge (i.e. a same layer constraint).
Default value is false.
allowSameLayerEdges - true iff unconstrained same layer edges are allowed.
public void assignLayers(LayoutGraph g,
Layers layers,
LayoutDataProvider ldp)
assignLayers in interface Layererg - the graph containing all nodes and edges.layers - a structure that is filled by the layerer. If the layerer is used for layering incremental nodes,
the layers structure already have to contain all non-incremental nodes.ldp - LayoutDataProvider that can be used to query information about
the nodes - note that positional information
(see NodeData.getPosition() and NodeData.getLayer()) cannot
be available at any time.Layers.insert(byte, int),
Layer.add(y.base.Node)protected void checkConstraints()
IllegalArgumentException - if the constraint network is inconsistent
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||