public class SelectionTool extends MouseTool
Basically, the sequence of mouse-events comprises :
[SR:pending] refactor class name to sth like "GenericTool" or "MouseTransformTool"...
lastMouseEvent, mouseOutside| Modifier and Type | Method and Description |
|---|---|
void |
flush()
called when this tool is being replaced by another mouse-tool in the hosting
editor kit ; this delegates to the underlying MouseTransform factory
|
void |
init()
called when this tool is being activated in the hosting
editor kit ; this delegates to the underlying MouseTransform factory
|
void |
mouseDragged(PEMouseEvent e)
Invoke "process" on the current MouseTransform (if non-null).
|
void |
mouseMoved(PEMouseEvent e)
Change mouse cursor according to the MouseTransform returned by the factory for the
given PEMouseEvent.
|
void |
mousePressed(PEMouseEvent e)
- right button click (popup trigger) -> raise popup menu.
- left button -> createMouseTransform using the mtFactory given in the constructor. |
void |
mouseReleased(PEMouseEvent e)
Invokes "end" on the current MouseTransform if non-null.
|
void |
paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D allocation,
double scale)
Do tool specific painting.
|
getLastMouseEvent, keyPressed, keyReleased, mouseClicked, mouseEntered, mouseExited, processKeyEventpublic void paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D allocation,
double scale)
public void init()
public void flush()
public void mousePressed(PEMouseEvent e)
mousePressed in interface PEMouseInputListenermousePressed in class MouseToolpublic void mouseDragged(PEMouseEvent e)
mouseDragged in interface PEMouseInputListenermouseDragged in class MouseToolpublic void mouseReleased(PEMouseEvent e)
mouseReleased in interface PEMouseInputListenermouseReleased in class MouseToolpublic void mouseMoved(PEMouseEvent e)
mouseMoved in interface PEMouseInputListenermouseMoved in class MouseToolSubmit a bug : syd@jpicedt.org