|
GoGraph |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.jgraph.graph.BasicMarqueeHandler
|
+--gograph.base.graph.GGMarqueeHandler
MarqueeHandler that connects vertices and displays popupmenus.
| Field Summary | |
protected java.awt.Point |
current
|
protected org.jgraph.graph.PortView |
firstPort
Holds the first and the current port. |
protected GoGraph |
gograph
Access back to GoGraph panel. |
protected org.jgraph.graph.PortView |
port
|
protected java.awt.Point |
start
Holds the start and the current point. |
| Fields inherited from class org.jgraph.graph.BasicMarqueeHandler |
currentPoint, marqueeBounds, previousCursor, startPoint |
| Constructor Summary | |
GGMarqueeHandler(GoGraph gograph)
Creates a new instance of GGMarqueeHandler. |
|
| Method Summary | |
javax.swing.JPopupMenu |
createPopupMenu(java.awt.Point pt,
java.lang.Object cell)
Creates a JPopupMenu containing context available actions. |
org.jgraph.graph.Port[] |
getConnectingPorts()
Returns the two selected ports for connection |
org.jgraph.graph.PortView |
getSourcePortAt(java.awt.Point point)
Find a cell at point and return its first port as a PortView. |
protected org.jgraph.graph.PortView |
getTargetPortAt(java.awt.Point point)
Find a cell at point and return its first port as a PortView. |
boolean |
isForceMarqueeEvent(java.awt.event.MouseEvent e)
Override to gain control (for popupMenu and connectMode). |
void |
mouseDragged(java.awt.event.MouseEvent e)
Find port under mouse and repaint connector. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Show special cursor if over port. |
void |
mousePressed(java.awt.event.MouseEvent e)
Display popupMenu or remember start location and first port. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Connect the first port and the current port in the graph or repaint. |
protected void |
paintConnector(java.awt.Color fg,
java.awt.Color bg,
java.awt.Graphics g)
Use xor-mode on graphics to paint connector. |
protected void |
paintPort(java.awt.Graphics g)
Use the preview flag to draw a highlighted port. |
| Methods inherited from class org.jgraph.graph.BasicMarqueeHandler |
getCurrentPoint, getMarqueeBounds, getPreviousCursor, getStartPoint, overlay, paint, setCurrentPoint, setMarqueeBounds, setPreviousCursor, setStartPoint |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected GoGraph gograph
protected java.awt.Point start
protected java.awt.Point current
protected org.jgraph.graph.PortView firstPort
protected org.jgraph.graph.PortView port
| Constructor Detail |
public GGMarqueeHandler(GoGraph gograph)
gograph - Access back to GoGraph panel.| Method Detail |
public boolean isForceMarqueeEvent(java.awt.event.MouseEvent e)
isForceMarqueeEvent in class org.jgraph.graph.BasicMarqueeHandlere - Source mouse event.
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in class org.jgraph.graph.BasicMarqueeHandlere - Source mouse event.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in class org.jgraph.graph.BasicMarqueeHandlere - Source mouse event.public org.jgraph.graph.PortView getSourcePortAt(java.awt.Point point)
point - Point where port is.
protected org.jgraph.graph.PortView getTargetPortAt(java.awt.Point point)
point - Point where cell is.
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in class org.jgraph.graph.BasicMarqueeHandlere - Source mouse event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in class org.jgraph.graph.BasicMarqueeHandlere - Source mouse event.
protected void paintConnector(java.awt.Color fg,
java.awt.Color bg,
java.awt.Graphics g)
fg - Foreground color.bg - Background color.g - Graphics context.protected void paintPort(java.awt.Graphics g)
g - Graphics context.
public javax.swing.JPopupMenu createPopupMenu(java.awt.Point pt,
java.lang.Object cell)
pt - Point where to evaluate context.cell - Cell on which to evaluate context.
public org.jgraph.graph.Port[] getConnectingPorts()
|
GoGraph |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||