|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.conversation.CPGraphViewer
This provides graphical display of a conversation policy, including a popup window showing details of selected states & transitions. States may be dragged around on the screen. The layout can also be saved and stored layouts can be loaded
TYPICAL USAGE:
1. Create a CPGraphViewer
2. Create a CPGraphLoader and load a state-machine into it.
3. Load the Layout from a saved file
4. Load the frame to diplay the viewer
OLD VERSION -- TO BE DELETED Replaced by AbleCpGraphViewer.
Constructor Summary | |
---|---|
CPGraphViewer(java.lang.String frameName)
Constructor for CPGraphViewer |
|
CPGraphViewer(java.lang.String frameName,
java.lang.String viewerName)
Constructor for CPGraphViewer |
Method Summary | |
---|---|
void |
fixDisplay()
This tweaks the graph's display in misc ways: |
CPGraphLoader |
getCPGraphLoader()
Returns the associated graph loader object |
javax.swing.JFrame |
getFrame()
Returns the bounding frame |
java.awt.Graphics |
getGraphics()
Returns the graphics object associated with the canvas |
javax.swing.JComponent |
getGraphPane()
Returns the Swing component on which the graph is displayed. |
java.awt.Point |
getLocation()
Returns the location where the viewer is set to be displayed |
java.lang.String |
getName()
Returns the name of the frame |
boolean |
isVisible()
Returns true if the frame displaying the CP is visible, false if not |
void |
loadFrame()
Displays the (state-machine) graph object on a frame and displays the menu |
void |
loadFromLayout(java.io.File f)
Loads the layout from the file represented by the file object |
void |
loadGraph(CPGraphLoader graphLoader)
Loads the state-machine into the graph using a CPGraphLoader. |
static void |
main(java.lang.String[] args)
main -- for testing |
void |
saveCurrentLayout(java.io.File f)
Saves the current layout into the file represented by the file object |
void |
setLocation(java.awt.Point p)
Sets the location for displaying the viewer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CPGraphViewer(java.lang.String frameName)
frameName
- name to be assigned to the displaying framepublic CPGraphViewer(java.lang.String frameName, java.lang.String viewerName)
frameName
- name to be assigned to the displaying frameviewerName
- string identifier for the viewerMethod Detail |
public javax.swing.JFrame getFrame()
public java.awt.Graphics getGraphics()
public java.lang.String getName()
public void fixDisplay()
(1) Moves the graph over & down a bit
(2) Fixes size of the canvas.
public javax.swing.JComponent getGraphPane()
public void loadGraph(CPGraphLoader graphLoader)
graphLoader
- CPGraphLoader object used to load the state-machinepublic CPGraphLoader getCPGraphLoader()
public void saveCurrentLayout(java.io.File f)
the
- file object for storing the current layoutpublic void loadFromLayout(java.io.File f)
the
- file object for loading the layout frompublic void loadFrame()
public boolean isVisible()
public void setLocation(java.awt.Point p)
p
- the point to display the viewer atpublic java.awt.Point getLocation()
public static void main(java.lang.String[] args)
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |