|
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.incremental.AspectRatioComponentLayerer
public class AspectRatioComponentLayerer
Wrapper Layerer implementation that delegates the actual layering to a delegate Layerer. If the graph consists of multiple components, they will be identified and each of the components will be layered separately using the delegate Layerer instance. After that they will all be merged such that the desired aspect ratio is fulfilled best. Note that for grouped graphs the desired aspect ratio is also considered for each group node separately.
setDesiredAspectRatio(double)
,
MultiComponentLayerer
Constructor Summary | |
---|---|
AspectRatioComponentLayerer(Layerer singleComponentLayerer)
Creates a new instance of AspectRatioComponentLayerer using the given delegate. |
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. |
double |
getDesiredAspectRatio()
Returns the desired aspect ratio. |
Layerer |
getSingleComponentLayerer()
Returns the Layerer instance that is used for delegation. |
boolean |
isConsiderNodeSize()
Returns whether the node size should be considered. |
void |
setConsiderNodeSize(boolean considerNodeSize)
Whether or not the node size should be considered. |
void |
setDesiredAspectRatio(double desiredAspectRatio)
Specifies the desired aspect ratio. |
void |
setSingleComponentLayerer(Layerer singleComponentLayerer)
Sets the new delegate Layerer instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AspectRatioComponentLayerer(Layerer singleComponentLayerer)
Method Detail |
---|
public Layerer getSingleComponentLayerer()
public void setSingleComponentLayerer(Layerer singleComponentLayerer)
NullPointerException
- if the argument is null
singleComponentLayerer
- the new instance.public boolean isConsiderNodeSize()
setConsiderNodeSize(boolean)
public void setConsiderNodeSize(boolean considerNodeSize)
considerNodeSize
- public double getDesiredAspectRatio()
setDesiredAspectRatio(double)
public void setDesiredAspectRatio(double desiredAspectRatio)
desiredAspectRatio
- 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 |