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, processKeyEvent
public 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 PEMouseInputListener
mousePressed
in class MouseTool
public void mouseDragged(PEMouseEvent e)
mouseDragged
in interface PEMouseInputListener
mouseDragged
in class MouseTool
public void mouseReleased(PEMouseEvent e)
mouseReleased
in interface PEMouseInputListener
mouseReleased
in class MouseTool
public void mouseMoved(PEMouseEvent e)
mouseMoved
in interface PEMouseInputListener
mouseMoved
in class MouseTool
Submit a bug : syd@jpicedt.org