|
|
|||||||||
| 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 abstract 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:
PopupMenuFactory. It also sets the cursor shape according to
the currently installed MouseTransform.
[SR:pending] refactor class name to sth like "GenericTool" or "MouseTransformTool"…
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jpicedt.graphic.toolkit.MouseTool |
|---|
MouseTool.MouseToolType |
| Field Summary | |
|---|---|
protected CursorFactory |
cursorFactory
|
protected EditorKit |
editorKit
|
protected MouseTransformFactory |
mtFactory
|
protected UserConfirmationCache |
ucc
|
| Fields inherited from class jpicedt.graphic.toolkit.MouseTool |
|---|
lastMouseEvent, mouseOutside |
| Constructor Summary | |
|---|---|
protected |
SelectionTool(EditorKit editorKit,
MouseTransformFactory mtFactory)
|
| Method Summary | |
|---|---|
void |
flush()
Appelé lorsque cet outil est remplacé par un autre outil à la souris dans l' EditorKit
hôte ; La fonction est en grande partie déléguée à la MouseTransform sousjacente. |
void |
init()
Appelé lorsque cet outil est activé par l' EditorKit hôte ; La fonction est en grande
partie déléguée à la MouseTransform sousjacente. |
void |
mouseDragged(PEMouseEvent e)
Invoke "process" on the current MouseTransform (if non-null). |
void |
mouseMoved(PEMouseEvent e)
Invoke "process" on the current MouseTransform (if non-null). |
void |
mousePressed(PEMouseEvent e)
clic droit souris (déclencheur de menu contextuel) → déroule le menu contextuel. |
void |
mouseReleased(PEMouseEvent e)
Invokes "next()" on the current MouseTransform if non-null. |
void |
paint(Graphics2D g,
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 |
| Field Detail |
|---|
protected EditorKit editorKit
protected CursorFactory cursorFactory
protected MouseTransformFactory mtFactory
protected UserConfirmationCache ucc
| Constructor Detail |
|---|
protected SelectionTool(EditorKit editorKit,
MouseTransformFactory mtFactory)
editorKit - the editorKit that owns this mouseToolmtFactory - the factory that produces MouseTransform's in response to a mousePressed| Method Detail |
|---|
public void paint(Graphics2D g,
Rectangle2D allocation,
double scale)
paint in class MouseToolpublic void init()
EditorKit hôte ; La fonction est en grande
partie déléguée à la MouseTransform sousjacente.
init in class MouseToolpublic void flush()
EditorKit
hôte ; La fonction est en grande partie déléguée à la MouseTransform sousjacente.
flush in class MouseToolpublic void mousePressed(PEMouseEvent e)
createMouseTransform en utilisant la
mtFactory passée au constructeur.
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 MouseTool
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||