|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.hierarchic.AsIsLayerer
public class AsIsLayerer
This layerer implementation assigns layers by analyzing already existing node coordinates. Nodes whose bounding boxes intersect a common y-coordinate are assigned to the same layer.
Constructor Summary | |
---|---|
AsIsLayerer()
|
Method Summary | |
---|---|
void |
assignLayers(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
This method assigns all nodes in the graph to layers and registers them in the Layers instance. |
int |
assignNodeLayer(LayoutGraph g,
NodeMap layerMap,
EdgeList reversedEdges)
|
double |
getHalo()
Gets the size of the halo around a node or the insets respectively that are used to calculate layer overlaps. |
protected double |
getMax(LayoutGraph graph,
Node node)
Callback used to calculate the lower (max) value of a node. |
double |
getMaximumNodeSize()
Gets the maximum size of a node that is used to calculate layer overlaps. |
protected double |
getMin(LayoutGraph graph,
Node node)
Callback used to calculate the upper (min) value of a node. |
double |
getMinimumNodeSize()
Gets the minimum size of a node that is used to calculate layer overlaps. |
double |
getNodeScalingFactor()
Gets the scaling factor that is used to scale the nodes' height. |
void |
setMaximumNodeSize(double max)
Sets the maximum size of a node that is used to calculate layer overlaps. |
void |
setMinimumNodeSize(double min)
Sets the minimum size of a node that is used to calculate layer overlaps. |
void |
setNodeHalo(double halo)
Sets the size of the halo around a node or the insets respectively that are used to calculate layer overlaps. |
void |
setNodeScalingFactor(double factor)
Sets the scaling factor that is used to scale the nodes' height. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsIsLayerer()
Method Detail |
---|
public double getNodeScalingFactor()
1.0d
which results in no scaling.
public void setNodeScalingFactor(double factor)
IllegalArgumentException
- if the specified value is less than
0
.factor
- the new scaling factor [0.0d .. Double.MAX_VALUE]
public double getMaximumNodeSize()
Double.MAX_VALUE
which results in no
restriction being set.
setNodeScalingFactor(double)
,
setNodeHalo(double)
public void setMaximumNodeSize(double max)
IllegalArgumentException
- if the specified value is less than
0
.max
- the maximum size of a node [0.0d .. Double.MAX_VALUE]
setNodeScalingFactor(double)
,
setNodeHalo(double)
public double getMinimumNodeSize()
0.0d
which results in no
restriction being set.
setNodeScalingFactor(double)
,
setNodeHalo(double)
public void setMinimumNodeSize(double min)
IllegalArgumentException
- if the specified value is less than
0
.min
- the minimum size of a node [0.0d .. Double.MAX_VALUE]
setNodeScalingFactor(double)
,
setNodeHalo(double)
public void setNodeHalo(double halo)
halo
- the size of a node's halo [-Double.MAX_VALUE .. Double.MAX_VALUE]
public double getHalo()
0.0d
which results in no modification
[0.0d .. Double.MAX_VALUE]
public int assignNodeLayer(LayoutGraph g, NodeMap layerMap, EdgeList reversedEdges)
protected double getMin(LayoutGraph graph, Node node)
protected double getMax(LayoutGraph graph, Node node)
public void assignLayers(LayoutGraph graph, Layers layers, LayoutDataProvider ldp)
Layerer
Layers
instance. In order to create new layers, the factory
method Layers.insert(byte, int)
must be used.
assignLayers
in interface Layerer
graph
- the graph that contains the nodes that should be distributed
into the layerslayers
- the object that will be filled with the results of the
calculationldp
- 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)
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |