Package jpicedt.graphic.toolkit
Class MoveTool
- java.lang.Object
-
- java.awt.event.KeyAdapter
-
- jpicedt.graphic.toolkit.MouseTool
-
- jpicedt.graphic.toolkit.MoveTool
-
- All Implemented Interfaces:
java.awt.event.KeyListener,java.util.EventListener,PEMouseInputListener
public class MoveTool extends MouseTool
A MouseTool used to translate a target Element by a given vector.- Since:
- jPicEdt 1.3
- Version:
- $Id: MoveTool.java,v 1.8.2.1 2007/09/02 11:56:28 reynal Exp $
- Author:
- Sylvain Reynal
-
-
Field Summary
-
Fields inherited from class jpicedt.graphic.toolkit.MouseTool
lastMouseEvent, mouseOutside
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmouseDragged(PEMouseEvent e)set the 2nd pt of the translation vector and translate the targetvoidmouseMoved(PEMouseEvent e)set the cursorvoidmousePressed(PEMouseEvent e)set the first point of the translation vectorvoidmouseReleased(PEMouseEvent e)this default implementation simply stores the given mouse-event in lastMouseEvent fieldvoidpaint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)Allow the tool to paint shapes that are specific to this tool.-
Methods inherited from class jpicedt.graphic.toolkit.MouseTool
flush, getLastMouseEvent, init, keyPressed, keyReleased, mouseClicked, mouseEntered, mouseExited, processKeyEvent
-
-
-
-
Method Detail
-
mousePressed
public void mousePressed(PEMouseEvent e)
set the first point of the translation vector- Specified by:
mousePressedin interfacePEMouseInputListener- Overrides:
mousePressedin classMouseTool
-
mouseDragged
public void mouseDragged(PEMouseEvent e)
set the 2nd pt of the translation vector and translate the target- Specified by:
mouseDraggedin interfacePEMouseInputListener- Overrides:
mouseDraggedin classMouseTool
-
mouseReleased
public void mouseReleased(PEMouseEvent e)
Description copied from class:MouseToolthis default implementation simply stores the given mouse-event in lastMouseEvent field- Specified by:
mouseReleasedin interfacePEMouseInputListener- Overrides:
mouseReleasedin classMouseTool
-
mouseMoved
public void mouseMoved(PEMouseEvent e)
set the cursor- Specified by:
mouseMovedin interfacePEMouseInputListener- Overrides:
mouseMovedin classMouseTool
-
-