http://www.jpicedt.org

jpicedt.graphic.toolkit
Class MirrorTool

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by jpicedt.graphic.toolkit.MouseTool
          extended by jpicedt.graphic.toolkit.MirrorTool
All Implemented Interfaces:
KeyListener, EventListener, PEMouseInputListener

public class MirrorTool
extends MouseTool

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:

Describe class MirrorTool here.

Since:
jPicEdt 1.6
Version:
$Id: MirrorTool.java,v 1.6 2013/03/27 06:57:31 vincentb1 Exp $
Author:
Vincent Belaïche

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

MirrorTool

public MirrorTool(EditorKit kit,
                  Element target)
Construit une nouvel examplaire de MirrorTool.

Parameters:
kit - l'EditorKit où est enregistré cet outil à la souris.
target - l'Element sur lequel porte la réflection.
Method Detail

mousePressed

public void mousePressed(PEMouseEvent e)
La méthode mousePressed place le point origine ptOrg , puis confirme la réflection.

Specified by:
mousePressed in interface PEMouseInputListener
Overrides:
mousePressed in class MouseTool
Parameters:
e - l'évènement PEMouseEvent donnant l'action à la souris.

mouseDragged

public void mouseDragged(PEMouseEvent e)
Description copied from class: MouseTool
this default implementation simply stores the given mouse-event in lastMouseEvent field

Specified by:
mouseDragged in interface PEMouseInputListener
Overrides:
mouseDragged in class MouseTool

mouseReleased

public void mouseReleased(PEMouseEvent e)
Description copied from class: MouseTool
this default implementation simply stores the given mouse-event in lastMouseEvent field

Specified by:
mouseReleased in interface PEMouseInputListener
Overrides:
mouseReleased in class MouseTool

mouseMoved

public void mouseMoved(PEMouseEvent e)
Description copied from class: MouseTool
this default implementation simply stores the given mouse-event in lastMouseEvent field

Specified by:
mouseMoved in interface PEMouseInputListener
Overrides:
mouseMoved in class MouseTool

flush

public void flush()
Called when this tool is being replaced by another tool in the hosting kit

Overrides:
flush in class MouseTool

paint

public void paint(Graphics2D g,
                  Rectangle2D allocation,
                  double scale)
Allow the tool to paint shapes that are specific to this tool.

Overrides:
paint in class MouseTool

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org