|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.event.KeyAdapter jpicedt.graphic.toolkit.MouseTool jpicedt.graphic.toolkit.MirrorTool
public class MirrorTool
Un MouseTool
utilisé pour effectuer une réflection sur un
Element
cible en utilisant un point origine
ptOrg
par lequel passe l'axe de réflection, et un point
extrémité ptEnd
tel que le vecteur allant de
ptOrg
à ptEnd
soit normal à l'axe de réflection
Séquence des opérations à la souris:
ptOrg
ptEnd
en dessinant
le vecteur correspondant.ptEnd
ptEnd
, c'est à dire dans un rayon inférieur à la
moitié du vecteur normal, puis remise à zéro. Si le clic est loin effectue
seulement la remise à zéro de l'outil.MirrorTool
here.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jpicedt.graphic.toolkit.MouseTool |
---|
MouseTool.MouseToolType |
Field Summary |
---|
Fields inherited from class jpicedt.graphic.toolkit.MouseTool |
---|
lastMouseEvent, mouseOutside |
Constructor Summary | |
---|---|
MirrorTool(EditorKit kit,
Element target)
Construit une nouvel examplaire de MirrorTool . |
Method Summary | |
---|---|
void |
flush()
Called when this tool is being replaced by another tool in the hosting kit |
void |
mouseDragged(PEMouseEvent e)
this default implementation simply stores the given mouse-event in lastMouseEvent field |
void |
mouseMoved(PEMouseEvent e)
this default implementation simply stores the given mouse-event in lastMouseEvent field |
void |
mousePressed(PEMouseEvent e)
La méthode mousePressed place le point origine
ptOrg , puis confirme la réflection. |
void |
mouseReleased(PEMouseEvent e)
this default implementation simply stores the given mouse-event in lastMouseEvent field |
void |
paint(Graphics2D g,
Rectangle2D allocation,
double scale)
Allow the tool to paint shapes that are specific to this tool. |
Methods inherited from class jpicedt.graphic.toolkit.MouseTool |
---|
getLastMouseEvent, init, 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 |
Constructor Detail |
---|
public MirrorTool(EditorKit kit, Element target)
MirrorTool
.
kit
- l'EditorKit
où est enregistré cet outil à la souris.target
- l'Element
sur lequel porte la réflection.Method Detail |
---|
public void mousePressed(PEMouseEvent e)
mousePressed
place le point origine
ptOrg
, puis confirme la réflection.
mousePressed
in interface PEMouseInputListener
mousePressed
in class MouseTool
e
- l'évènement PEMouseEvent
donnant l'action à la souris.public void mouseDragged(PEMouseEvent e)
MouseTool
lastMouseEvent
field
mouseDragged
in interface PEMouseInputListener
mouseDragged
in class MouseTool
public void mouseReleased(PEMouseEvent e)
MouseTool
lastMouseEvent
field
mouseReleased
in interface PEMouseInputListener
mouseReleased
in class MouseTool
public void mouseMoved(PEMouseEvent e)
MouseTool
lastMouseEvent
field
mouseMoved
in interface PEMouseInputListener
mouseMoved
in class MouseTool
public void flush()
flush
in class MouseTool
public void paint(Graphics2D g, Rectangle2D allocation, double scale)
paint
in class MouseTool
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |