uk.ac.kcl.cch.jb.pliny.controls
Interface IZoomableImageResource

All Known Implementing Classes:
ImageResource

public interface IZoomableImageResource

implement this interface in a Pliny resource which has an image-oriented Resource which has its size controllable by a ZoomControlContributionItem.

Author:
John Bradley

Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          allows the caller to subscribe to the resource to be notified about changes in zoom size as they occur.
 org.eclipse.draw2d.geometry.Rectangle getImagePosition()
          gets the current ImagePosition rectangle -- the position where the image sits in the user's frame.
 int getZoomSize()
          gets the current Zoom size stored in the resource.
 void removePropertyChangeListener(PropertyChangeListener listener)
          allows the caller to unsubscribe to the resource.
 void setZoomSize(int zoom)
          sets the current Zoom size stored in the resource to the given value.
 

Method Detail

getZoomSize

public int getZoomSize()
gets the current Zoom size stored in the resource.

Returns:
int the current zoom size.

setZoomSize

public void setZoomSize(int zoom)
sets the current Zoom size stored in the resource to the given value.

Parameters:
zoom - int the new zoom size to save.

getImagePosition

public org.eclipse.draw2d.geometry.Rectangle getImagePosition()
gets the current ImagePosition rectangle -- the position where the image sits in the user's frame.

Returns:
Rectangle the resource's current ImagePosition setting.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
allows the caller to subscribe to the resource to be notified about changes in zoom size as they occur. The caller who makes use of this interface is only interested in Resource.ATTRIBUTES_PROP events.

Parameters:
listener -

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
allows the caller to unsubscribe to the resource.

Parameters:
listener -