uk.ac.starlink.topcat.plot
Class Zoomer

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by javax.swing.event.MouseInputAdapter
          extended by uk.ac.starlink.topcat.plot.Zoomer
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener, MouseInputListener

public class Zoomer
extends MouseInputAdapter

Mouse listener which can manufacture zoom requests on the basis of mouse gestures. The zones over which mouse gestures are gathered from and over which graphical feedback is given is defined by a list of ZoomRegion objects held by instances of this class.

To use an instance of this class, you must install it as both a MouseListener and a MouseMotionListener on the relevant component.

Since:
28 Mar 2006
Author:
Mark Taylor

Constructor Summary
Zoomer()
          Constructor.
 
Method Summary
 List getRegions()
          Returns the list of ZoomRegion objects which defines the behaviour of this object.
 void mouseDragged(MouseEvent evt)
           
 void mouseMoved(MouseEvent evt)
           
 void mousePressed(MouseEvent evt)
           
 void mouseReleased(MouseEvent evt)
           
 void setCursorComponent(Component comp)
          Sest the component, if any, over which this object should modify the cursor over.
 void setRegions(List regionList)
          Sets the list of ZoomRegion objects which defines the behaviour of this object.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited
 

Constructor Detail

Zoomer

public Zoomer()
Constructor.

Method Detail

getRegions

public List getRegions()
Returns the list of ZoomRegion objects which defines the behaviour of this object.

Returns:
zoom region list

setRegions

public void setRegions(List regionList)
Sets the list of ZoomRegion objects which defines the behaviour of this object.

Parameters:
regionList - list of zoom regions

setCursorComponent

public void setCursorComponent(Component comp)
Sest the component, if any, over which this object should modify the cursor over. The cursor will be altered to indicate when the mouse is in an active zoom target region.

Parameters:
comp - component over which the cursor can be changed

mousePressed

public void mousePressed(MouseEvent evt)
Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class MouseAdapter

mouseMoved

public void mouseMoved(MouseEvent evt)
Specified by:
mouseMoved in interface MouseMotionListener
Overrides:
mouseMoved in class MouseAdapter

mouseDragged

public void mouseDragged(MouseEvent evt)
Specified by:
mouseDragged in interface MouseMotionListener
Overrides:
mouseDragged in class MouseAdapter

mouseReleased

public void mouseReleased(MouseEvent evt)
Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class MouseAdapter


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.