|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object BasicMarqueeHandler net.clackrouter.gui.ClackMarqueeHandler
public class ClackMarqueeHandler
ClackMarqueeHandler deals with user events for the RouterGraph.
The main role of this class is to handle mouse actions on the Router graph, keeping track of dragging and clicking behavior to implement different functionality
This class is modifed from GPMarqueeHandler from JGraphpad
Field Summary | |
---|---|
protected java.awt.geom.Rectangle2D |
bounds
|
static int |
CELL_EDGE_DEFAULT
|
static int |
CELL_PORT_DEFAULT
|
static int |
CELL_VERTEX_DEFAULT
|
static int |
CELL_VERTEX_ELLIPSE
|
static int |
CELL_VERTEX_IMAGE
|
static int |
CELL_VERTEX_TEXT
|
protected java.awt.geom.Point2D |
current
|
protected javax.swing.JComboBox |
currentComponentType
|
protected java.awt.Color |
defaultBorderColor
The default color for borders |
protected PortView |
firstPort
|
protected ClackFramework |
graphpad
A reference to the graphpad object |
protected PortView |
lastPort
|
protected PortView |
port
|
protected java.awt.geom.Point2D |
start
|
Constructor Summary | |
---|---|
ClackMarqueeHandler(ClackFramework graphpad)
Constructor for GPMarqueeHandler. |
Method Summary | |
---|---|
java.awt.Point |
getLastClick()
X-Y location of the last mouse click |
PortView |
getPortViewAt(int x,
int y,
boolean jump)
|
protected boolean |
isClackPopupTrigger(java.awt.event.MouseEvent e)
implements new definition of a right-click |
boolean |
isForceMarqueeEvent(java.awt.event.MouseEvent e)
Return true if this handler should be preferred over other handlers. |
void |
mouseDragged(java.awt.event.MouseEvent event)
|
void |
mouseMoved(java.awt.event.MouseEvent event)
|
void |
mousePressed(java.awt.event.MouseEvent event)
Handles mousePressed event. |
void |
mouseReleased(java.awt.event.MouseEvent event)
|
protected void |
mouseReleasedPopup(java.awt.event.MouseEvent event)
|
void |
overlay(java.awt.Graphics g)
|
protected void |
paintPort(java.awt.Graphics g)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CELL_VERTEX_ELLIPSE
public static final int CELL_VERTEX_DEFAULT
public static final int CELL_VERTEX_IMAGE
public static final int CELL_VERTEX_TEXT
public static final int CELL_PORT_DEFAULT
public static final int CELL_EDGE_DEFAULT
protected ClackFramework graphpad
protected java.awt.Color defaultBorderColor
protected java.awt.geom.Point2D start
protected java.awt.geom.Point2D current
protected java.awt.geom.Rectangle2D bounds
protected javax.swing.JComboBox currentComponentType
protected PortView port
protected PortView firstPort
protected PortView lastPort
Constructor Detail |
---|
public ClackMarqueeHandler(ClackFramework graphpad)
Method Detail |
---|
public java.awt.Point getLastClick()
public boolean isForceMarqueeEvent(java.awt.event.MouseEvent e)
protected boolean isClackPopupTrigger(java.awt.event.MouseEvent e)
public void mousePressed(java.awt.event.MouseEvent event)
We check to see if it is a pop-up trigger, in which case we keep note of the component that has been right-clicked
We also pass non-popup events to the super-class and take care of updating the graph's selected cell
public void mouseDragged(java.awt.event.MouseEvent event)
public PortView getPortViewAt(int x, int y, boolean jump)
public void mouseReleased(java.awt.event.MouseEvent event)
protected void mouseReleasedPopup(java.awt.event.MouseEvent event)
public void mouseMoved(java.awt.event.MouseEvent event)
public void overlay(java.awt.Graphics g)
protected void paintPort(java.awt.Graphics g)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |