Class GraphDrawingPack.DirEdgeDrawing
All Packages This Package Previous Next
Class GraphDrawingPack.DirEdgeDrawing
java.lang.Object
|
+----GraphDrawingPack.DirEdgeDrawing
-
public class
DirEdgeDrawing
-
extends Object
-
implements EdgeDrawingInterface
DirEdgeDrawing: implements all methods for drawing directed edges
on canvas. Directed edges are arcs between two vertices with an
EdgeShape (default arrow) in the middle. The midpoint of the arc
is the active area of the edge and is indicated by the EdgeShape.
If there is one directed edge between two vertices, it is drawn as
a straight line. If there are two directed edges then the edges
bow out in an arc. Right now, due to a rounding error, if the
vertices are far apart the edges don\'t exactly reach the
vertices. This should be fixed. Highlighted edges are red,
and plain edges are black.
-
bottom
-
-
left
-
-
midx
-
-
midy
-
-
numdegs
-
-
right
-
-
shape
-
-
startang
-
-
top
-
-
type
-
-
DirEdgeDrawing(Edge)
-
-
EdgeinRect(double, double, double, double)
-
return true if active portion of this edge is in rectangle
-
drawEdge(GraphCanvas)
-
draw this edge on GraphCanvas
-
getShape()
-
return string name of edge shape
-
midx()
-
return x-value of midpoint
-
midy()
-
return y-value of midpoint
-
ptInEdge(GraphCanvas, double, double)
-
return true if pt(x,y) is in active portion of this edge
-
setShape(String)
-
set EdgeShape.
-
update()
-
recalculate drawing information for the edge
midx
public int midx
midy
public int midy
left
public int left
top
public int top
right
public int right
bottom
public int bottom
startang
public int startang
numdegs
public int numdegs
shape
public EdgeShapeInterface shape
type
public int type
DirEdgeDrawing
public DirEdgeDrawing(Edge _e)
drawEdge
public void drawEdge(GraphCanvas gc)
-
draw this edge on GraphCanvas
ptInEdge
public boolean ptInEdge(GraphCanvas gc,
double x,
double y)
-
return true if pt(x,y) is in active portion of this edge
EdgeinRect
public boolean EdgeinRect(double x,
double y,
double x2,
double y2)
-
return true if active portion of this edge is in rectangle
setShape
public void setShape(String t)
-
set EdgeShape. Currently choices are "ARROW", "INHERITS",
"IMPLEMENTING", and "AGGREGATION". Any other string sets type="ARROW"
getShape
public String getShape()
-
return string name of edge shape
update
public void update()
-
recalculate drawing information for the edge
midx
public int midx()
-
return x-value of midpoint
midy
public int midy()
-
return y-value of midpoint
All Packages This Package Previous Next