|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.CanonicMultiStageLayouter
An abstract base class for layout algorithms that provides services to simplify and decompose the input graph before it is passed to the core layout routine itself.
Subclassed layout algorithms have to provide implementations
for the abstract methods
CanonicMultiStageLayouter.doLayoutCore(LayoutGraph)
and
CanonicMultiStageLayouter.canLayoutCore(LayoutGraph)
The maximal number of steps involved before and after the core layout
will be invoked are summerized below.
Field Summary |
Fields inherited from interface y.layout.Layouter |
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
CanonicMultiStageLayouter()
Constructs a new AbstractLayouter |
Method Summary | |
void |
appendStage(LayoutStage stage)
Appends a stage to the layout pipeline. |
GraphLayout |
calcLayout(GraphInterface graph,
GraphLayout layout)
Returns a layout for the given graph interface and layout. |
GraphLayout |
calcLayout(LayoutGraph layoutGraph)
Returns a layout for the given layout graph. |
boolean |
canLayout(LayoutGraph graph)
Tests whether or not the given graph can be layed out by this layouter. |
protected abstract boolean |
canLayoutCore(LayoutGraph graph)
Subclasses have to provide information whether or not they can layout the given graph. |
void |
doLayout(GraphInterface graph,
GraphLayout layout)
Calculates a layout for the given graph interface and layout. |
void |
doLayout(LayoutGraph layoutGraph)
Calculates a layout for the given graph. |
protected abstract void |
doLayoutCore(LayoutGraph graph)
Subclasses have to provide core layout code in this method. |
void |
enableOnlyCore()
Disables all layout stages and performs only the core layouter. |
LayoutStage |
getComponentLayouter()
Returns the LayoutStage responsible for laying out the connected components of the graph. |
LayoutStage |
getGroupNodeHider()
Returns the LayoutStage that is responsible for hiding away the grouping information for the layout algorithm. |
LayoutStage |
getLabelLayouter()
Returns the algorithm used for placing labels. |
byte |
getLayoutOrientation()
Returns the main layout orientation. |
LayoutStage |
getOrientationLayouter()
Returns the LayoutStage that is responsible for changing the orientation of the computed layout. |
LayoutStage |
getParallelEdgeLayouter()
Returns the LayoutStage responsible for routing parallel edges. |
LayoutStage |
getSelfLoopLayouter()
Returns the LayoutStage used for routing Selfloops. |
LayoutStage |
getSubgraphLayouter()
Returns the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph. |
boolean |
isComponentLayouterEnabled()
Returns whether or not ComponentLayouter is enabled. |
boolean |
isGroupNodeHidingEnabled()
Returns whether or not to hide away group nodes before the layout begins. |
boolean |
isLabelLayouterEnabled()
Returns whether or not LabelLayouter is enabled. |
boolean |
isOrientationLayouterEnabled()
Returns whether or not the OrientationLayouter is enabled. |
boolean |
isParallelEdgeLayouterEnabled()
Returns whether or not the ParallelEdgeLayouter is enabled. |
boolean |
isSelfLoopLayouterEnabled()
Returns whether or not the SelfLoopLayouter is enabled. |
boolean |
isSubgraphLayouterEnabled()
Returns whether or not the SubgraphLayouter is enabled. |
void |
prependStage(LayoutStage stage)
Prepends a stage to the layout pipeline. |
void |
removeStage(LayoutStage stage)
|
void |
setComponentLayouter(LayoutStage layouter)
Sets the LayoutStage responsible for laying out the connected components of the graph. |
void |
setComponentLayouterEnabled(boolean enabled)
Whether or not to enable the ComponentLayouter. |
void |
setGroupNodeHider(LayoutStage layouter)
Sets the LayoutStage that is responsible for hiding away grouping information for the layout algorithm. |
void |
setGroupNodeHidingEnabled(boolean groupNodeHidingEnabled)
Whether or not to hide away group nodes before the layout begins. |
void |
setLabelLayouter(LayoutStage labeler)
Sets the algorithm used for placing labels |
void |
setLabelLayouterEnabled(boolean enabled)
Whether or not to enable the labeling algorithm. |
void |
setLayoutOrientation(byte orientation)
Sets the main layout orientation. |
void |
setOrientationLayouter(LayoutStage layouter)
Sets the LayoutStage that is responsible for changing the orientation of the computed layout. |
void |
setOrientationLayouterEnabled(boolean enabled)
Whether or not to enable the OrientationLayouter. |
void |
setParallelEdgeLayouter(LayoutStage layouter)
Sets the ParallelEdgeLayouter responsible for routing parallel edges. |
void |
setParallelEdgeLayouterEnabled(boolean enabled)
Whether or not to enable the ParallelEdgeLayouter. |
void |
setSelfLoopLayouter(LayoutStage layouter)
Sets the LayoutStage responsible for routing Selfloops. |
void |
setSelfLoopLayouterEnabled(boolean enabled)
Whether or not to enable the SelfLoopLayouter. |
void |
setSubgraphLayouter(LayoutStage layouter)
Sets the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph. |
void |
setSubgraphLayouterEnabled(boolean enabled)
Whether or not to enable the SubgraphLayouter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CanonicMultiStageLayouter()
Method Detail |
protected abstract void doLayoutCore(LayoutGraph graph)
protected abstract boolean canLayoutCore(LayoutGraph graph)
public void prependStage(LayoutStage stage)
public void appendStage(LayoutStage stage)
public void removeStage(LayoutStage stage)
public LayoutStage getLabelLayouter()
GreedyMISLabeling
will be returned.
public void setLabelLayouter(LayoutStage labeler)
public LayoutStage getSelfLoopLayouter()
SelfLoopLayouter
will be returned.
public void setSelfLoopLayouter(LayoutStage layouter)
public LayoutStage getParallelEdgeLayouter()
ParallelEdgeLayouter
will be returned.
public void setParallelEdgeLayouter(LayoutStage layouter)
public LayoutStage getComponentLayouter()
public void setComponentLayouter(LayoutStage layouter)
public LayoutStage getSubgraphLayouter()
public void setSubgraphLayouter(LayoutStage layouter)
public LayoutStage getGroupNodeHider()
public void setGroupNodeHider(LayoutStage layouter)
public LayoutStage getOrientationLayouter()
public void setOrientationLayouter(LayoutStage layouter)
public void setOrientationLayouterEnabled(boolean enabled)
public void setLayoutOrientation(byte orientation)
Note that the documentation for the other layout options assumes that
this default layout orientation LayoutOrientation.BOTTOM_TO_TOP
is being used.
orientation
- one of LayoutOrientation.BOTTOM_TO_TOP
, LayoutOrientation.LEFT_TO_RIGHT
,
LayoutOrientation.TOP_TO_BOTTOM
or LayoutOrientation.RIGHT_TO_LEFT
.public byte getLayoutOrientation()
CanonicMultiStageLayouter.setLayoutOrientation(byte)
public boolean isOrientationLayouterEnabled()
public void setSelfLoopLayouterEnabled(boolean enabled)
public boolean isSelfLoopLayouterEnabled()
public void setLabelLayouterEnabled(boolean enabled)
public boolean isLabelLayouterEnabled()
public boolean isGroupNodeHidingEnabled()
public void setGroupNodeHidingEnabled(boolean groupNodeHidingEnabled)
public void setComponentLayouterEnabled(boolean enabled)
public boolean isComponentLayouterEnabled()
public void setParallelEdgeLayouterEnabled(boolean enabled)
public boolean isParallelEdgeLayouterEnabled()
public void setSubgraphLayouterEnabled(boolean enabled)
public boolean isSubgraphLayouterEnabled()
public void enableOnlyCore()
public void doLayout(LayoutGraph layoutGraph)
doLayout
in interface Layouter
public void doLayout(GraphInterface graph, GraphLayout layout)
public GraphLayout calcLayout(LayoutGraph layoutGraph)
public GraphLayout calcLayout(GraphInterface graph, GraphLayout layout)
public boolean canLayout(LayoutGraph graph)
canLayout
in interface Layouter
|
© 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 |