|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.base.Graph | +--y.layout.LayoutGraph
This class represents a drawing of a graph.
Field Summary |
Fields inherited from class y.base.Graph |
AFTER, BEFORE, listeners |
Constructor Summary | |
LayoutGraph()
Creates a new Layout Graph |
|
LayoutGraph(LayoutGraph graph,
YCursor nodeSubset)
Creates a copy of the given subgraph. |
Method Summary | |
Rectangle |
getBoundingBox()
Returns the bounding box of the diagram. |
YPoint |
getCenter(Node node)
Returns the position of a node in a drawing. |
double |
getCenterX(Node v)
Returns the center x-coord of the given node. |
double |
getCenterY(Node v)
Returns the center y-coord of the given node. |
EdgeLabelLayout[] |
getEdgeLabelLayout(Object edge)
Returns EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge. |
EdgeLayout |
getEdgeLayout(Object edge)
Returns the layout information for an edge in the drawing. |
EdgeList |
getEdgeList()
Returns a list, which contains the edges of the graph. |
abstract Edge |
getFeature(EdgeLabelLayout labelLayout)
Returns the edge which is described by a given label layout. |
abstract Node |
getFeature(NodeLabelLayout labelLayout)
Returns the node which is described by a given label layout. |
double |
getHeight(Node v)
Returns the height of the given node |
abstract EdgeLabelLayout[] |
getLabelLayout(Edge edge)
Returns EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge. |
abstract NodeLabelLayout[] |
getLabelLayout(Node node)
Returns NodeLabelLayout objects which describe the layouts of the labels that belong to the given node. |
abstract EdgeLayout |
getLayout(Edge edge)
Returns the layout information for an edge in the drawing. |
abstract NodeLayout |
getLayout(Node node)
Returns the layout information for a node in the drawing. |
YPoint |
getLocation(Node node)
Returns the position of the node in a drawing. |
NodeLabelLayout[] |
getNodeLabelLayout(Object node)
Returns NodeLabelLayout objects which describe the layouts of the labels that belong to the given node. |
NodeLayout |
getNodeLayout(Object node)
Returns the layout information for a node in the drawing. |
YPointPath |
getPath(Edge edge)
Returns the path of an edge. |
YList |
getPathList(Edge edge)
Returns the path of an edge. |
YList |
getPointList(Edge edge)
Returns the controllpoints of an edge. |
YPointPath |
getPoints(Edge edge)
Returns the controllpoints of an edge. |
YRectangle |
getRectangle(Node node)
Returns the bounding box of a node. |
YDimension |
getSize(Node node)
Returns the size of the node in a drawing. |
YPoint |
getSourcePointAbs(Edge edge)
Returns the coordinates of the source endpoint of an edge in absolute coordinates. |
YPoint |
getSourcePointRel(Edge edge)
Returns the coordinates of the source endpoint of an edge in relative coordinates to the center of the source node. |
YPoint |
getTargetPointAbs(Edge edge)
Returns the coordinates of the target endpoint of an edge in absolute coordinates. |
YPoint |
getTargetPointRel(Edge edge)
Returns the coordinates of the target endpoint of an edge in relative coordinates to the center of the target node. |
double |
getWidth(Node v)
Returns the width of the given node. |
double |
getX(Node v)
Returns the upper left x-coord of the given node. |
double |
getY(Node v)
Returns the upper left y-coord of the given node. |
void |
moveBy(Node node,
double dx,
double dy)
Moves the location of a node by a given vector |
void |
setCenter(Node v,
double x,
double y)
Sets the center coords of the given node. |
void |
setCenter(Node node,
YPoint position)
Sets the position of a node in a drawing. |
void |
setEndPointsAbs(Edge edge,
YPoint source,
YPoint target)
Set the two endpoints of an edge in absolute coordinates. |
void |
setLocation(Node v,
double x,
double y)
Sets the upper left coords of the given node. |
void |
setLocation(Node node,
YPoint position)
Set the position of the node in a drawing. |
void |
setPath(Edge edge,
YList path)
Sets the path of an edge. |
void |
setPath(Edge edge,
YPointPath path)
Sets the path of an edge. |
void |
setPoints(Edge edge,
YList points)
Sets the controllpoints of an edge. |
void |
setPoints(Edge edge,
YPointPath points)
Sets the controllpoints of an edge. |
void |
setSize(Node v,
double w,
double h)
Sets the size of the given node. |
void |
setSize(Node node,
YDimension size)
Set the size of the node in a drawing. |
void |
setSourcePointAbs(Edge edge,
YPoint point)
Sets the coordinates of the source endpoint of an edge in absolute coordinates. |
void |
setSourcePointRel(Edge edge,
YPoint point)
Sets the coordinates of the source endpoint of an edge in relative coordinates to the center of the source node. |
void |
setTargetPointAbs(Edge edge,
YPoint point)
Sets the coordinates of the target endpoint of an edge in absolute coordinates. |
void |
setTargetPointRel(Edge edge,
YPoint point)
Sets the coordinates of the target endpoint of an edge in relative coordinates to the center of the target node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LayoutGraph()
public LayoutGraph(LayoutGraph graph, YCursor nodeSubset)
Method Detail |
public abstract NodeLayout getLayout(Node node)
node
- a node in the drawing.
node
.public abstract EdgeLayout getLayout(Edge edge)
edge
- a edge in the drawing.
edge
.public abstract NodeLabelLayout[] getLabelLayout(Node node)
node
- a node in the drawing.
node
.public abstract EdgeLabelLayout[] getLabelLayout(Edge edge)
edge
- an edge in the drawing.
edge
.public abstract Node getFeature(NodeLabelLayout labelLayout)
public abstract Edge getFeature(EdgeLabelLayout labelLayout)
public NodeLayout getNodeLayout(Object node)
getNodeLayout
in interface GraphLayout
node
- a node in the drawing.
node
.public EdgeLayout getEdgeLayout(Object edge)
getEdgeLayout
in interface GraphLayout
edge
- a edge in the drawing.
edge
.public NodeLabelLayout[] getNodeLabelLayout(Object node)
getNodeLabelLayout
in interface GraphLayout
node
- a node in the drawing.
node
.public EdgeLabelLayout[] getEdgeLabelLayout(Object edge)
getEdgeLabelLayout
in interface GraphLayout
edge
- an edge in the drawing.
edge
.public double getCenterX(Node v)
public double getCenterY(Node v)
public YPoint getCenter(Node node)
node
- a node in the graph
public double getX(Node v)
public double getY(Node v)
public YPoint getLocation(Node node)
node
- a node in the graph
public double getWidth(Node v)
public double getHeight(Node v)
public YDimension getSize(Node node)
node
- a node in the graph.
public YRectangle getRectangle(Node node)
node
- a node in the graph.
public void setCenter(Node node, YPoint position)
node
- a node in the graphposition
- the center of the node in the drawing of the nodepublic void setCenter(Node v, double x, double y)
public void setSize(Node v, double w, double h)
public void setSize(Node node, YDimension size)
node
- a node in the graphsize
- the size of the node.public void setLocation(Node v, double x, double y)
public void setLocation(Node node, YPoint position)
node
- a node in the graphposition
- the upper left corner of the drawing of the nodepublic void moveBy(Node node, double dx, double dy)
node
- a node in the graphdx
- the x-component of the vectordy
- the y-component of the vectorpublic YPointPath getPoints(Edge edge)
edge
- an edge in the graph
public YList getPointList(Edge edge)
edge
- an edge in the graph
public YPointPath getPath(Edge edge)
edge
- an edge in the graph
public YList getPathList(Edge edge)
edge
- an edge in the graph
public void setPath(Edge edge, YPointPath path)
Precondition: The length of the path must be 2 at least.
edge
- an edge in the graphpath
- the path sequence.public void setPath(Edge edge, YList path)
Precondition: The length of the path must be 2 at least.
edge
- an edge in the graphpath
- the path sequence given as a YListpublic void setPoints(Edge edge, YPointPath points)
edge
- an edge in the graphpoints
- the sequence of controllpoints.public void setPoints(Edge edge, YList points)
edge
- an edge in the graphpoints
- the sequence of controllpoints as a YListpublic void setEndPointsAbs(Edge edge, YPoint source, YPoint target)
edge
- an edge in the graph.source
- the port on the source side of the edge.target
- the port on the target side of the edge.public YPoint getSourcePointRel(Edge edge)
edge
- an edge in the graphpublic YPoint getTargetPointRel(Edge edge)
edge
- an edge in the graphpublic void setSourcePointRel(Edge edge, YPoint point)
edge
- an edge in the graphpoint
- public void setTargetPointRel(Edge edge, YPoint point)
edge
- an edge in the graphpublic YPoint getSourcePointAbs(Edge edge)
edge
- an edge in the graphpublic YPoint getTargetPointAbs(Edge edge)
edge
- an edge in the graphpublic void setSourcePointAbs(Edge edge, YPoint point)
edge
- an edge in the graphpoint
- public void setTargetPointAbs(Edge edge, YPoint point)
edge
- an edge in the graphpoint
- public EdgeList getEdgeList()
public Rectangle getBoundingBox()
getBoundingBox
in interface GraphLayout
|
© 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 |