Class GraphDrawingPack.DirEdgeStraight
All Packages This Package Previous Next
Class GraphDrawingPack.DirEdgeStraight
java.lang.Object
|
+----GraphDrawingPack.DirEdgeStraight
-
public class
DirEdgeStraight
-
extends Object
-
implements EdgeDrawingInterface
DirEdgeStraight: implements all methods for drawing directed edges
on canvas. Directed edges straight lines between two vertices
with an arrow in the middle. The midpoint of
the arc is the active area of the edge and is indicated by the
EdgeShape. If there are two edges between a pair of vertices, two
EdgeShapes are drawn. Highlighted edges are red, and plain
edges are black.
-
midx
-
-
midy
-
-
xs
-
-
ys
-
-
DirEdgeStraight(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 to Arrow
-
update()
-
recalculate drawing information for the edge
midx
public int midx
midy
public int midy
xs
public int xs[]
ys
public int ys[]
DirEdgeStraight
public DirEdgeStraight(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 to 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