Interface GraphDrawingPack.GraphDrawingInterface
All Packages This Package Previous Next
Interface GraphDrawingPack.GraphDrawingInterface
-
public interface
GraphDrawingInterface
-
extends Object
GraphDrawingInterface: all methods for drawing the graph on
canvas. GraphCanvas has an instance of GraphDrawingInterface to
implement all drawing functions. To change implementation of
GraphDrawingInterface, one would have to also change the
instantiation of GraphDrawingInterface in GraphCanvas.
-
EdgeinRect(EdgeList, double, double, double, double)
-
return true if midpt of edge e is in the specified rectangle
-
VertexinRect(Vertex, double, double, double, double)
-
return true if this vertex is in rectangle specified
-
addAllInRectToHE(double, double, double, double)
-
highlight all edges within specified rectangle
-
addAllInRectToHV(double, double, double, double)
-
highlight all vertices within specified rectangle
-
addAllInRectToHV_E(double, double, double, double)
-
highlight all vertices and edges within specified rectangle
-
drawAttachedEdges(Vertex)
-
draw all edges attached to vertex
-
drawE()
-
draw all edges in graph
-
drawEdge(Edge)
-
draw Edge
-
drawEdge(EdgeList)
-
draw Edge
-
drawEdge(Vertex, Vertex)
-
draw Edge from v1 to v2 if it exists in the graph
-
drawGraph()
-
draw all edges and vertices in graph
-
drawHE()
-
draw all highlighted edges in graph
-
drawHV()
-
draw all highlighted vertices in graph
-
drawHVtrans(int, int)
-
draw all highlighted vertices translated by specified xtrans, ytrans.
-
drawV()
-
draw all vertices in graph
-
drawVertex(Vertex)
-
draw Vertex
-
drawvtrans(Vertex, int, int)
-
draw vertex v translated by specified xtrans, ytrans
-
ptInEdge(EdgeList, double, double)
-
return true if pt(x,y) is in active portion of the edge
-
ptInVertex(Vertex, double, double)
-
return true if pt(x,y) is in vertex v
-
ptOnEdge(double, double)
-
return the edge whose active portion contains point (x,y),
null if no edge
-
ptOnVert(double, double)
-
return vertex which contains pt(x,y), return null if pt in no vertex
drawVertex
public abstract void drawVertex(Vertex v)
-
draw Vertex
ptInVertex
public abstract boolean ptInVertex(Vertex v,
double x,
double y)
-
return true if pt(x,y) is in vertex v
ptOnVert
public abstract Vertex ptOnVert(double x,
double y)
-
return vertex which contains pt(x,y), return null if pt in no vertex
VertexinRect
public abstract boolean VertexinRect(Vertex v,
double x,
double y,
double x2,
double y2)
-
return true if this vertex is in rectangle specified
drawV
public abstract void drawV()
-
draw all vertices in graph
drawHV
public abstract void drawHV()
-
draw all highlighted vertices in graph
drawEdge
public abstract void drawEdge(Edge e)
-
draw Edge
drawEdge
public abstract void drawEdge(EdgeList e)
-
draw Edge
drawEdge
public abstract void drawEdge(Vertex v1,
Vertex v2)
-
draw Edge from v1 to v2 if it exists in the graph
drawE
public abstract void drawE()
-
draw all edges in graph
drawHE
public abstract void drawHE()
-
draw all highlighted edges in graph
ptInEdge
public abstract boolean ptInEdge(EdgeList e,
double x,
double y)
-
return true if pt(x,y) is in active portion of the edge
EdgeinRect
public abstract boolean EdgeinRect(EdgeList e,
double x,
double y,
double x2,
double y2)
-
return true if midpt of edge e is in the specified rectangle
ptOnEdge
public abstract Edge ptOnEdge(double x,
double y)
-
return the edge whose active portion contains point (x,y),
null if no edge
drawGraph
public abstract void drawGraph()
-
draw all edges and vertices in graph
drawvtrans
public abstract void drawvtrans(Vertex v,
int xtrans,
int ytrans)
-
draw vertex v translated by specified xtrans, ytrans
drawHVtrans
public abstract void drawHVtrans(int xtrans,
int ytrans)
-
draw all highlighted vertices translated by specified xtrans, ytrans.
Note: vertices are not actually moved in the graph representation, only
drawn in a different position on the canvas.
drawAttachedEdges
public abstract void drawAttachedEdges(Vertex v)
-
draw all edges attached to vertex
addAllInRectToHV
public abstract void addAllInRectToHV(double x,
double y,
double x2,
double y2)
-
highlight all vertices within specified rectangle
addAllInRectToHE
public abstract void addAllInRectToHE(double x,
double y,
double x2,
double y2)
-
highlight all edges within specified rectangle
addAllInRectToHV_E
public abstract void addAllInRectToHV_E(double x,
double y,
double x2,
double y2)
-
highlight all vertices and edges within specified rectangle
All Packages This Package Previous Next