|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.ConstraintLayerer
public class ConstraintLayerer
Layerer implementation that uses relative and absolute layering constraints.
This layerer can use two sets of constraints:
ConstraintLayerer.ConstraintFactory instance, which should be created
with createConstraintFactory(y.base.Graph) for a given graph instance.
![]() |
![]() |
![]() |
![]() |
| Nested Class Summary | |
|---|---|
static interface |
ConstraintLayerer.ConstraintFactory
Interface specification for classes that can create suitable constraints for a ConstraintLayerer instance. |
| Field Summary | |
|---|---|
static String |
EDGE_WEIGHTS_DPKEY
DataProvider key for additional edge weights of type |
| Constructor Summary | |
|---|---|
ConstraintLayerer()
|
|
ConstraintLayerer(Layerer coreLayerer)
|
|
| Method Summary | |
|---|---|
int |
assignNodeLayer(LayoutGraph g,
NodeMap layer,
EdgeList reversedEdges)
This method assigns the nodes in the graph to layers. |
protected void |
checkConstraints()
Checks if the current set of strong constraints is consistent (i.e. has no cycles) |
static ConstraintLayerer.ConstraintFactory |
createConstraintFactory(Graph g)
Create an instance of ConstraintLayerer.ConstraintFactory that is suitable for this
layerer implementation. |
Layerer |
getCoreLayerer()
Gets the core layerer for this layerer instance. |
boolean |
isAllowSameLayerEdges()
Returns if 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. |
void |
setCoreLayerer(Layerer coreLayerer)
Sets the core layerer for 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
| Constructor Detail |
|---|
public ConstraintLayerer(Layerer coreLayerer)
public ConstraintLayerer()
| Method Detail |
|---|
public Layerer getCoreLayerer()
TopologicalLayerer is used.
public void setCoreLayerer(Layerer coreLayerer)
TopologicalLayerer is used.
coreLayerer - the layerer that is used for unconstrained nodespublic boolean isAllowSameLayerEdges()
public void setAllowSameLayerEdges(boolean allowSameLayerEdges)
allowSameLayerEdges - true iff unconstrained same layer edges are allowed.
public int assignNodeLayer(LayoutGraph g,
NodeMap layer,
EdgeList reversedEdges)
assignNodeLayer in interface LayererIllegalArgumentException - if any strong constraints are inconsistentg - the graph for which the layers are determined.layer - here the layers are storedreversedEdges - here the edges are stored which had been reversed.
protected void checkConstraints()
IllegalArgumentException - if the constraint network is inconsistentpublic static ConstraintLayerer.ConstraintFactory createConstraintFactory(Graph g)
ConstraintLayerer.ConstraintFactory that is suitable for this
layerer implementation.
The ConstraintFactory instance is bound to the graph instance g, i.e. if the input graph for the
layerer changes, a new ConstraintFactory instance must be retrieved. This instance can be used to create
constraints for this graph instance
g - the current graph for the layerer
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||