Package jpicedt.graphic.event
Class ZoomEvent
- java.lang.Object
-
- java.util.EventObject
-
- jpicedt.graphic.event.ZoomEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class ZoomEvent extends java.util.EventObjectClass 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PicPointgetCenterPoint()Return the coordinates of the point that was at the center of the canvas before the zoom changed.doublegetNewZoomValue()Return the new zoom factor valuedoublegetOldZoomValue()Return the old zoom factor valuejava.lang.StringtoString()a textual representation of this event
-
-
-
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 eventoldZoom- the previous zoom valuenewZoom- the new zoom valueptCenter- 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 java.lang.String toString()
a textual representation of this event- Overrides:
toStringin classjava.util.EventObject
-
-