|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.AbstractLayoutStage | +--y.layout.OrientationLayouter
A layout stage that performs changes the orientation of the layout that another algorithm calculates.
Field Summary |
Fields inherited from interface y.layout.LayoutOrientation |
BOTTOM_TO_TOP, LEFT_TO_RIGHT, RIGHT_TO_LEFT, TOP_TO_BOTTOM |
Fields inherited from interface y.layout.Layouter |
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
OrientationLayouter()
Instantiates a new OrientationLayouter. |
|
OrientationLayouter(byte orientation)
Instantiates a new OrientationLayouter with a given orientation. |
|
OrientationLayouter(Layouter coreLayouter)
Instantiates a new OrientationLayouter. the core layout routine will be delegated to the given layouter. |
Method Summary | |
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be layed
out by this algorithm. |
protected void |
completeOrientationChange(LayoutGraph graph)
Method that will be called after the core layouter has been activated. |
protected YPoint |
completeTransform(YPoint p)
Transforms a point for the completion phase. |
Insets |
createOrientedInsets(Insets insets)
Create and return an insets object that is a geometric transform of the given inserts. |
void |
doLayout(LayoutGraph graph)
Assigns a new graph layout to the given layout graph. |
byte |
getOrientation()
Returns the orientation of the layout. |
boolean |
isHorizontalOrientation()
Returns whether or not the set orientation is a horizontal orientation, i.e. one of LayoutOrientation.LEFT_TO_RIGHT or
LayoutOrientation.RIGHT_TO_LEFT . |
protected void |
prepareOrientationChange(LayoutGraph graph)
Method that will be called before the core layouter gets activated. |
protected YPoint |
prepareTransform(YPoint p)
Transforms a point for the preparation phase. |
void |
setOrientation(byte orientation)
Sets the orientation of the layout. |
protected YPoint |
transform(YPoint p,
boolean prepare)
Transforms a point for the preparation or completion phase. |
Methods inherited from class y.layout.AbstractLayoutStage |
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OrientationLayouter(Layouter coreLayouter)
public OrientationLayouter()
public OrientationLayouter(byte orientation)
OrientationLayouter.setOrientation(byte)
Method Detail |
public void setOrientation(byte orientation)
LayoutOrientation.TOP_TO_BOTTOM
is set.
orientation
- one of LayoutOrientation.TOP_TO_BOTTOM
,
LayoutOrientation.LEFT_TO_RIGHT
, LayoutOrientation.RIGHT_TO_LEFT
, and
LayoutOrientation.BOTTOM_TO_TOP
.public byte getOrientation()
OrientationLayouter.setOrientation(byte)
public boolean isHorizontalOrientation()
LayoutOrientation.LEFT_TO_RIGHT
or
LayoutOrientation.RIGHT_TO_LEFT
.
public boolean canLayout(LayoutGraph graph)
Layouter
true
iff the given graph can be layed
out by this algorithm. Calling doLayout
with
the given graph as it's argument will only success if
this method returns true
.
canLayout
in interface Layouter
public void doLayout(LayoutGraph graph)
Layouter
doLayout
in interface Layouter
protected void prepareOrientationChange(LayoutGraph graph)
protected void completeOrientationChange(LayoutGraph graph)
OrientationLayouter.prepareOrientationChange(LayoutGraph)
.
protected YPoint transform(YPoint p, boolean prepare)
prepare
- if true
then the transformation
is for the preparation phase, otherwise for the completion phase.OrientationLayouter.prepareTransform(YPoint)
,
OrientationLayouter.completeTransform(YPoint)
protected YPoint prepareTransform(YPoint p)
OrientationLayouter.prepareOrientationChange(LayoutGraph)
protected YPoint completeTransform(YPoint p)
OrientationLayouter.completeOrientationChange(LayoutGraph)
public Insets createOrientedInsets(Insets insets)
|
© 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 |