Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://www.jpicedt.org
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jpicedt.graphic.event
Class ZoomEvent

    java.lang.Object
      java.util.EventObject
          jpicedt.graphic.event.ZoomEvent

All Implemented Interfaces:
  Serializable

public class ZoomEvent
extends EventObject

Class for notifications of zoom-factor changes sourced by a PECanvas.

Since:
  jpicedt 1.3.2
Version:
  $Id: ZoomEvent.java,v 1.5.2.1 2007/09/02 11:56:18 reynal Exp $
Author:
  Sylvain Reynal
See Also:
  Serialized Form

Field Summary

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`ZoomEvent(PECanvas source, double oldZoom, double newZoom, PicPoint ptCenter)` a new ZoomEvent sourced from the given PECanvas

Method Summary
`PicPoint` | `getCenterPoint()` Return the coordinates of the point that was at the center of the canvas before the zoom changed.
`double` | `getNewZoomValue()` Return the new zoom factor value
`double` | `getOldZoomValue()` Return the old zoom factor value
`String` | `toString()` a textual representation of this event

Methods inherited from class java.util.EventObject
`getSource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ZoomEvent

    public ZoomEvent(PECanvas source,
                     double oldZoom,
                     double newZoom,
                     PicPoint ptCenter)

  a new ZoomEvent sourced from the given PECanvas

Parameters:
  `source` - the originator of the event
  `oldZoom` - the previous zoom value
  `newZoom` - the new zoom value
  `ptCenter` - the point (in model-coordinates) that is expected to be at the center of the view-port. Can be null.

Method Detail

### getOldZoomValue

    public double getOldZoomValue()

  Return the old zoom factor value

### getNewZoomValue

    public double getNewZoomValue()

  Return the new zoom factor value

### getCenterPoint

    public PicPoint getCenterPoint()

  Return the coordinates of the point that was at the center of the canvas before the zoom changed. This is aimed at allowing javax.swing.ViewPort, javax.swing.Scrollpane, etc... to update their view accordingly.

### toString

    public String toString()

  a textual representation of this event

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://www.jpicedt.org
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug : syd@jpicedt.org