Package jpicedt.graphic.toolkit
Class ZoomTool
- java.lang.Object
-
- java.awt.event.KeyAdapter
-
- jpicedt.graphic.toolkit.MouseTool
-
- jpicedt.graphic.toolkit.ZoomTool
-
- All Implemented Interfaces:
java.awt.event.KeyListener,java.util.EventListener,PEMouseInputListener
public class ZoomTool extends MouseTool
A mouse tool for EditorKit, which allows to zoom in and out while retaining the current scene at the center of the drawing sheet.- Since:
- jPicEdt 1.3.2
- 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 voidmouseMoved(PEMouseEvent e)set cursorvoidmousePressed(PEMouseEvent e)Depending on the button and the modifiers, we increase or decrease zoom, or do nothing.-
Methods inherited from class jpicedt.graphic.toolkit.MouseTool
flush, getLastMouseEvent, init, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseReleased, paint, processKeyEvent
-
-
-
-
Constructor Detail
-
ZoomTool
public ZoomTool(EditorKit kit)
construct a new ZoomTool for the given EditorKit- Since:
- jPicEdt 1.3.2
-
-
Method Detail
-
mousePressed
public void mousePressed(PEMouseEvent e)
Depending on the button and the modifiers, we increase or decrease zoom, or do nothing.- Specified by:
mousePressedin interfacePEMouseInputListener- Overrides:
mousePressedin classMouseTool
-
mouseMoved
public void mouseMoved(PEMouseEvent e)
set cursor- Specified by:
mouseMovedin interfacePEMouseInputListener- Overrides:
mouseMovedin classMouseTool
-
-