|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.KeyAdapter
jpicedt.graphic.toolkit.MouseTool
jpicedt.graphic.toolkit.SelectionTool
public class SelectionTool
This generic mouse-tool is dedicated to applying MouseTransform's to elements of a Drawing, following a uniform sequence of mouse-events. This class works hand-in-hand with a pluggable MouseTransformFactory which produces MouseTransform's on the fly from incoming mouse-events. Then any ensuing mouse-event invokes a specific method from the produced MouseTransform.
Basically, the sequence of mouse-events comprises :
[SR:pending] refactor class name to sth like "GenericTool" or "MouseTransformTool"...
Field Summary |
---|
Fields inherited from class jpicedt.graphic.toolkit.MouseTool |
---|
lastMouseEvent, mouseOutside |
Method Summary | |
---|---|
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. |
Methods inherited from class jpicedt.graphic.toolkit.MouseTool |
---|
getLastMouseEvent, keyPressed, keyReleased, mouseClicked, mouseEntered, mouseExited, processKeyEvent |
Methods inherited from class java.awt.event.KeyAdapter |
---|
keyTyped |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)
paint
in class MouseTool
public void init()
init
in class MouseTool
public void flush()
flush
in class MouseTool
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
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |