org.graffiti.plugin.view
Interface Zoomable

All Known Subinterfaces:
InteractiveView<T>, View, View2D
All Known Implementing Classes:
AbstractView, Viewport, ViewportAdapter

public interface Zoomable

Views implementing allow zooming.

Author:
Andreas Gleißner
See Also:
Viewport

Method Summary
 double getZoom()
          Returns the zoom factor.
 AffineTransform getZoomTransform()
          Returns the AffineTransform representing the current zoom.
 void setZoom(double factor)
          Sets the scale factor.
 

Method Detail

getZoomTransform

AffineTransform getZoomTransform()
Returns the AffineTransform representing the current zoom.

Returns:
the AffineTransform representing the current zoom.

getZoom

double getZoom()
Returns the zoom factor.

Returns:
the zoom factor. Smaller values yield in the display of a greater area with fewer details ("a view from greater distance"). 1.0 is the default value. Must be a finite value greater than 0.0.

setZoom

void setZoom(double factor)
Sets the scale factor. Should call ViewportEventDispatcher.onViewportChange(Viewport) on the ZoomEventDispatcher returned by MainFrame.getViewportEventDispatcher(). Do not call setZoom from within an implementation of ViewportListener.onViewportChange(Viewport), as it may cause a deadlock. An actual change of the zoom is not guaranteed. The Zoomable may arbitrarily restrict the values.

Parameters:
factor - the zoom factor to set. Smaller values yield in the display of a greater area with fewer details ("a view from greater distance"). 1.0 is the default value. Must be a finite value greater than 0.0.


Generated at 2012-05-30 11:00:36 PM CEST