All Packages Class Hierarchy This Package Previous Next Index
Class tw.edu.ncnu.im.cnclab.JGAP.UI.GraphCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----tw.edu.ncnu.im.cnclab.JGAP.UI.GraphCanvas
- public class GraphCanvas
- extends Canvas
The GraphCanvas class implements the Canvas of Graph.
- Version:
- 0.4 Jul 8, 1999
- Author:
- Ding-Yi Chen
-
ADJ_LIST
- Indicate the Graph showing as adjacency-linked-list.
-
ADJ_MATRIX
- Indicate the Graph showing as adjacency-matrix.
-
defaultHeight
-
-
defaultWidth
-
-
doublePrecision
- Specifies the number of digits to appear after the decimal point.
-
GRAPH
- Indicate the Graph showing as graph.
-
selfLoopRadius
- The radius of self-looped.
-
GraphCanvas(Graph, Window)
- Constructor of GraphCanvas
-
GraphCanvas(Graph, Window, int, int)
- Constructor of GraphCanvas
-
edgePrompt(Edge)
- Return the String representation of edge.
-
getMinimumSize()
-
-
getPreferredSize()
-
-
getRepresentType()
- Return the type of presentation.
-
paint(Graphics)
-
-
prePaint()
-
-
setRepresentType(int)
- Set the type of presentation.
-
setSize(int, int)
- Set the size of Canvas.
-
update(Graphics)
-
GRAPH
public static final int GRAPH
- Indicate the Graph showing as graph.
ADJ_MATRIX
public static final int ADJ_MATRIX
- Indicate the Graph showing as adjacency-matrix.
ADJ_LIST
public static final int ADJ_LIST
- Indicate the Graph showing as adjacency-linked-list.
defaultWidth
public static int defaultWidth
defaultHeight
public static int defaultHeight
doublePrecision
public static final int doublePrecision
- Specifies the number of digits to appear after the decimal point.
selfLoopRadius
public static final int selfLoopRadius
- The radius of self-looped.
GraphCanvas
public GraphCanvas(Graph graph,
Window parent)
- Constructor of GraphCanvas
- Parameters:
- graph - The graph.
- parent - the window that contain the canvas.
GraphCanvas
public GraphCanvas(Graph graph,
Window parent,
int width,
int height)
- Constructor of GraphCanvas
- Parameters:
- graph - The graph.
- parent - The window that contain the canvas.
- width - The width of canvas.
- height - The height of canvas.
setSize
public void setSize(int width,
int height)
- Set the size of Canvas.
- Parameters:
- width - The width of canvas.
- height - The height of canvas.
- Overrides:
- setSize in class Component
getRepresentType
public int getRepresentType()
- Return the type of presentation.
- Returns:
- the represent type of the graph
setRepresentType
public void setRepresentType(int representType)
- Set the type of presentation.
- Parameters:
- representType - The type of presentation.
- See Also:
- GRAPH, ADJ_MATRIX, ADJ_LIST
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Component
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Component
edgePrompt
protected String edgePrompt(Edge edge)
- Return the String representation of edge.
prePaint
public void prePaint()
paint
public void paint(Graphics g)
- Overrides:
- paint in class Canvas
update
public void update(Graphics g)
- Overrides:
- update in class Component
All Packages Class Hierarchy This Package Previous Next Index