|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.common.DisplayGraph scale.visual.SGD
public class SGD
This class implements graph displays for Scale using Java2D and Java Swing.
$Id: SGD.java,v 1.24 2007-10-04 19:58:40 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Field Summary |
---|
Fields inherited from class scale.common.DisplayGraph |
---|
DISPLAY_EDGE_LABELS, outputPath, SHOW_ANNO, SHOW_CDG, SHOW_CLEF, SHOW_DD, SHOW_DEFUSE, SHOW_DOM, SHOW_EXPR, SHOW_EXPR_MASK, SHOW_HIGH_EXPR, SHOW_LOW_EXPR, SHOW_MAYUSE, SHOW_PDOM, SHOW_TYPE |
Constructor Summary | |
---|---|
SGD()
|
Method Summary | |
---|---|
void |
addEdge(DisplayNode n1,
DisplayNode n2,
DColor color,
DEdge edgeAttributes,
java.lang.Object edgeInfo)
Add an edge to the graph from node n1 to node n2. |
void |
addNode(DisplayNode n)
Add a node to the graph. |
void |
closeWindow(java.lang.String context)
This closes an existing visualization window. |
java.lang.String |
dashedEdgeAttr()
Return attribute for dashed edges. |
java.lang.String |
dottedEdgeAttr()
Retrn attribute for dotted edges. |
void |
interact()
Respond to interative events with this display. |
void |
newGraph(java.lang.String context,
boolean top)
Initialize for a new graph. |
void |
openWindow(java.lang.String context,
java.lang.String title,
int graphAttributes)
This opens a new visualization window. |
void |
terminate()
Terminates the visualizer process. |
boolean |
visited(DisplayNode n)
Return true if the node has been processed. |
boolean |
windowExists(java.lang.String context)
Return true if the window for the given context still exists. |
Methods inherited from class scale.common.DisplayGraph |
---|
addDisplayString, getVisualizer, initColors, setOutputPath, setVisualizer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SGD()
Method Detail |
---|
public void newGraph(java.lang.String context, boolean top)
newGraph
in class DisplayGraph
context
- is the name associated with the graphtop
- if true places the root node at the top of the displaypublic java.lang.String dottedEdgeAttr()
public java.lang.String dashedEdgeAttr()
public void interact()
interact
in class DisplayGraph
public void openWindow(java.lang.String context, java.lang.String title, int graphAttributes)
openWindow
in class DisplayGraph
context
- is the user defined string to distinguish between
different windowstitle
- is title for the windowgraphAttributes
- species attributes for the graphDisplayGraph.newGraph(java.lang.String, boolean)
public void closeWindow(java.lang.String context)
closeWindow
in class DisplayGraph
context
- is the user defined string to distinguish between
different windowsDisplayGraph.newGraph(java.lang.String, boolean)
public void terminate()
terminate
in class DisplayGraph
public boolean visited(DisplayNode n)
visited
in class DisplayGraph
n
- is the node to checkpublic void addNode(DisplayNode n)
addNode
in class DisplayGraph
n
- is the nodepublic void addEdge(DisplayNode n1, DisplayNode n2, DColor color, DEdge edgeAttributes, java.lang.Object edgeInfo)
bits | use |
---|---|
5-0 | color |
6 | type: normal, backedge |
8-7 | pattern: solid, dashed, dotted
addEdge
in class DisplayGraph
n1
- is the first noden2
- is the second nodecolor
- specifies the edge coloredgeAttributes
- specifies the type, and form of the edgeedgeInfo
- is additional information about the edgepublic boolean windowExists(java.lang.String context)
windowExists
in class DisplayGraph
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |