|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsalvo.jesus.graph.visual.GraphPanelState
salvo.jesus.graph.visual.GraphPanelEdgeState
edu.ksu.cis.bnj.gui.components.EdgeState
State object that represents the edge mode in a GraphPanel. Edge mode being the ability to add an edge interactively by dragging the mouse from a vertex and releasing the mouse on another vertex.
Field Summary | |
protected java.awt.Cursor |
edgecursor
A cross-hair Cursor object |
protected salvo.jesus.graph.visual.GraphPanel |
gpanel
|
protected static java.awt.BasicStroke |
marquee
|
protected NodeManager |
owner
|
protected java.awt.Cursor |
previouscursor
Existing cursor prior to changing the cursor to a cross-hair |
protected java.awt.geom.Line2D.Double |
probableedgeline
Line2D object that is drawn when an edge is being interactively created. |
protected salvo.jesus.graph.visual.VisualVertex |
sourcevertex
Reference to the VisualVertex object selected during the mousePressed() method. |
Constructor Summary | |
EdgeState(NodeManager owner,
salvo.jesus.graph.visual.GraphPanel gpanel)
Creates a GraphPanelEdgeState object for the specified GraphPanel object. |
Method Summary | |
salvo.jesus.graph.visual.GraphPanelState |
mouseDragged(java.awt.event.MouseEvent e)
If there was a vertex clicked during the start of the drag (during the mousePressed() event), draw a line from the source vertex to the current coordinate. |
salvo.jesus.graph.visual.GraphPanelState |
mouseMoved(java.awt.event.MouseEvent e)
This method sets the cursor to a crosshair whenever the cursor enters a VisualVertex object. |
salvo.jesus.graph.visual.GraphPanelState |
mousePressed(java.awt.event.MouseEvent e)
Identifies the source vertex of a new Edge being created. |
salvo.jesus.graph.visual.GraphPanelState |
mouseReleased(java.awt.event.MouseEvent e)
Signifies the end of a drag. |
void |
paint(java.awt.Graphics2D g2d)
Call VisualGraph.paint() method, passing the Graphics2D context and the probable edge line to be drawn |
Methods inherited from class salvo.jesus.graph.visual.GraphPanelState |
informTargetVisualGraphComponentOfKeyEvent, informTargetVisualGraphComponentOfMouseEvent, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, recommendState, setGraphPanel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected salvo.jesus.graph.visual.VisualVertex sourcevertex
protected java.awt.geom.Line2D.Double probableedgeline
protected java.awt.Cursor edgecursor
protected java.awt.Cursor previouscursor
protected salvo.jesus.graph.visual.GraphPanel gpanel
protected NodeManager owner
protected static java.awt.BasicStroke marquee
Constructor Detail |
public EdgeState(NodeManager owner, salvo.jesus.graph.visual.GraphPanel gpanel)
Method Detail |
public salvo.jesus.graph.visual.GraphPanelState mousePressed(java.awt.event.MouseEvent e)
public salvo.jesus.graph.visual.GraphPanelState mouseReleased(java.awt.event.MouseEvent e)
public salvo.jesus.graph.visual.GraphPanelState mouseDragged(java.awt.event.MouseEvent e)
public salvo.jesus.graph.visual.GraphPanelState mouseMoved(java.awt.event.MouseEvent e)
public void paint(java.awt.Graphics2D g2d)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |