|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.CanonicMultiStageLayouter | +--y.layout.orthogonal.OrthogonalLayouter
This class provides a layout algorithm which produces orthogonal drawings.
OrthogonalLayouter can consider edge label data when laying out a graph.
That means that the the layout of edge labels will be part of the resulting
layout and the layout of nodes and edges is chosen in such a way that the
edge labels do not conflict with the rest of the layout.
See classes LabelLayoutData
, LabelLayoutConstants
LabelLayoutKeys
and LabelLayoutTranslator
on how
to setup the integrated edge label layout feature.
Here is an sample output of the layouter using the layout style OrthogonalLayouter.NORMAL_STYLE
.
Field Summary | |
static short |
BOX_STYLE
Layout style specifier. |
static short |
MIXED_STYLE
Layout style specifier. |
static int |
NODEMODEL_UNCHANGED
Deprecated. use OrthogonalLayouter.NORMAL_STYLE instead. |
static int |
NODEMODEL_UNIFORM
Deprecated. use OrthogonalLayouter.UNIFORM_STYLE instead. |
static int |
NORMAL_STYLE
Layout style specifier. |
static int |
NORMAL_TREE_STYLE
Layout style specifier. |
static int |
UNIFORM_STYLE
Layout style specifier. |
Fields inherited from interface y.layout.Layouter |
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
OrthogonalLayouter()
Returns a new instance. |
Method Summary | |
boolean |
canLayoutCore(LayoutGraph graph)
Returns always true . |
void |
doLayoutCore(LayoutGraph graph)
Assigns an orthogonal graph layout to the given layout graph. |
int |
getGrid()
Returns the size of the grid on which the nodes and edges are placed. |
int |
getLayoutStyle()
Returns the layout style of this layouter. |
int |
getNodeModel()
Deprecated. use OrthogonalLayouter.setLayoutStyle(int) instead. |
boolean |
getUseCrossingPostprocessing()
Returns if postprocessing is used to reduce the number of crossings. |
boolean |
getUseLengthReduction()
Returns if the algorithm optimizes over the length of the edges. |
boolean |
getUseRandomization()
Returns if a randomization strategy is used. |
boolean |
getUseSketchDrawing()
Returns if the existing drawing should be used as sketch. |
boolean |
getUseSpacePostprocessing()
Deprecated. |
void |
setGrid(int value)
Sets the size of the grid on which the nodes and edges are placed. |
void |
setLayoutStyle(int value)
Sets the layout style for this layouter. |
void |
setNodeModel(int value)
Deprecated. use OrthogonalLayouter.setLayoutStyle(int) instead. |
void |
setUseCrossingPostprocessing(boolean value)
Sets if postprocessing is used to reduce the number of crossings. |
void |
setUseLengthReduction(boolean value)
Sets if the algorithm optimizes over the length of the edges. |
void |
setUseRandomization(boolean value)
Sets if a randomization strategy is used. |
void |
setUseSketchDrawing(boolean value)
Sets if the existing drawing should be used as sketch. |
void |
setUseSpacePostprocessing(boolean value)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NORMAL_STYLE
public static final int UNIFORM_STYLE
public static final short BOX_STYLE
public static final short MIXED_STYLE
public static final int NORMAL_TREE_STYLE
OrthogonalLayouter.NORMAL_STYLE
but all directed subtree structures
of the graph will be layouted in an optimized way. All edges will be routed orthogonally.
The tree edges will be routed in a bus-like fashion.
public static final int NODEMODEL_UNCHANGED
OrthogonalLayouter.NORMAL_STYLE
instead.
public static final int NODEMODEL_UNIFORM
OrthogonalLayouter.UNIFORM_STYLE
instead.
Constructor Detail |
public OrthogonalLayouter()
Method Detail |
public void setNodeModel(int value)
OrthogonalLayouter.setLayoutStyle(int)
instead.
public int getNodeModel()
OrthogonalLayouter.setLayoutStyle(int)
instead.
public void setUseRandomization(boolean value)
true
.
value
- true
if randomization is used,
false
if randomization is not used.public boolean getUseRandomization()
true
.
true
if randomization is used,
false
if randomization is not used.OrthogonalLayouter.setUseRandomization(boolean)
public void setUseCrossingPostprocessing(boolean value)
true
.
value
- true
if postprocessing is used,
false
if postprocessing is not used.public boolean getUseCrossingPostprocessing()
true
.
OrthogonalLayouter.setUseCrossingPostprocessing(boolean)
public void setGrid(int value)
value
- a positive integerpublic int getGrid()
OrthogonalLayouter.setGrid(int)
public void setLayoutStyle(int value)
OrthogonalLayouter.NORMAL_STYLE
is set.
value
- one of OrthogonalLayouter.NORMAL_STYLE
, OrthogonalLayouter.UNIFORM_STYLE
, OrthogonalLayouter.BOX_STYLE
,
OrthogonalLayouter.MIXED_STYLE
or OrthogonalLayouter.NORMAL_TREE_STYLE
.public int getLayoutStyle()
OrthogonalLayouter.setLayoutStyle(int)
public void setUseSpacePostprocessing(boolean value)
true
.
value
- true
if postprocessing is used,
false
if postprocessing is not used.public boolean getUseSpacePostprocessing()
true
.
true
if postprocessing is used,
false
if postprocessing is not used.OrthogonalLayouter.setUseSpacePostprocessing(boolean)
public void setUseLengthReduction(boolean value)
true
.
value
- true
if length reduction is used,
false
if length reduction is not used.public boolean getUseLengthReduction()
true
if length reduction is used,
false
if length reduction is not used.OrthogonalLayouter.setUseLengthReduction(boolean)
public boolean getUseSketchDrawing()
true
if the existing drawing is used as sketch
false
otherwise.public void setUseSketchDrawing(boolean value)
value
- true
if the existing drawing should be used
as sketch false
otherwise.public boolean canLayoutCore(LayoutGraph graph)
true
.
canLayoutCore
in class CanonicMultiStageLayouter
public void doLayoutCore(LayoutGraph graph)
doLayoutCore
in class CanonicMultiStageLayouter
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |