http://www.jpicedt.org

jpicedt.graphic.toolkit
Class ZoomTool

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by jpicedt.graphic.toolkit.MouseTool
          extended by jpicedt.graphic.toolkit.ZoomTool
All Implemented Interfaces:
KeyListener, 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

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
ZoomTool(EditorKit kit)
          construct a new ZoomTool for the given EditorKit
 
Method Summary
 void mouseMoved(PEMouseEvent e)
          set cursor
 void mousePressed(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
 
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

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:
mousePressed in interface PEMouseInputListener
Overrides:
mousePressed in class MouseTool

mouseMoved

public void mouseMoved(PEMouseEvent e)
set cursor

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

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org