|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.transformer.GraphZoomer
This class contains algorithms which allow for zooming parts of a diagram only in a socalled fish-eye (radial) style. This type of zoom however will not introduce new bends for edges but will move the node centers and bends only.
Nested Class Summary | |
static interface |
GraphZoomer.Zoom
This interface can be implemented for custom zoom types. |
Field Summary |
Fields inherited from interface y.layout.Layouter |
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
GraphZoomer()
Creates a new instance of GraphZoomer |
Method Summary | |
void |
addRadialZoom(YPoint center,
double innerRadius,
double outerRadius,
double zoomFactor)
Adds a zoom operation to the list of operations to be performed on the graph during the doLayout phase. |
void |
addRectangularZoom(YPoint center,
double innerRadius,
double outerRadius,
double ratio,
double zoomFactor)
Adds a zoom operation to the list of operations performed during the doLayout phase. |
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be layed
out by this algorithm. |
void |
doLayout(LayoutGraph graph)
Assigns a new graph layout to the given layout graph. |
static void |
zoom(LayoutGraph graph,
GraphZoomer.Zoom zoom)
Convenience method which applies a custom zoom to the graph |
static void |
zoomRadial(LayoutGraph graph,
double centerX,
double centerY,
double innerRadius,
double outerRadius,
double zoomFactor)
Convenience method which applies a radial zoom to the graph |
static void |
zoomRectangular(LayoutGraph graph,
double centerX,
double centerY,
double innerRadius,
double outerRadius,
double ratio,
double zoomFactor)
Convenience method which applies a rectangular zoom to the graph |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphZoomer()
Method Detail |
public void addRadialZoom(YPoint center, double innerRadius, double outerRadius, double zoomFactor)
center
- the center of the zoominnerRadius
- the radius of the circle around the center inside which the zoom level is
constantly set to zoomFactor
outerRadius
- the radius of the outer circle around the center outside of which the zoomFactor
should be unchanged. This value must be greater than innerRadiuszoomFactor
- the zoomFactor inside the inner circlepublic void addRectangularZoom(YPoint center, double innerRadius, double outerRadius, double ratio, double zoomFactor)
center
- the center of the zoominnerRadius
- the radius of the rectangular shape around the center inside which the zoom level is
constantly set to zoomFactor
outerRadius
- the radius of the outer rectangular shape around the center outside of which the zoomFactor
should be unchanged. This value must be greater than innerRadiuszoomFactor
- the zoomFactor inside the inner rectanglepublic boolean canLayout(LayoutGraph graph)
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)
doLayout
in interface Layouter
public static final void zoomRadial(LayoutGraph graph, double centerX, double centerY, double innerRadius, double outerRadius, double zoomFactor)
public static final void zoomRectangular(LayoutGraph graph, double centerX, double centerY, double innerRadius, double outerRadius, double ratio, double zoomFactor)
public static final void zoom(LayoutGraph graph, GraphZoomer.Zoom zoom)
|
© 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 |