uk.ac.starlink.topcat.plot2
Class GuiNavigationListener<A>

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.NavigationListener<A>
      extended by uk.ac.starlink.topcat.plot2.GuiNavigationListener<A>
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener

public abstract class GuiNavigationListener<A>
extends uk.ac.starlink.ttools.plot2.NavigationListener<A>

Abstract NavigationListener subclass that works with a PlotPanel. The main thing it does is arrange for progress logging where required. The only time this is required is when a data pos iterator is used in handling (re-center) click events. That is generally only for 3d plots. But it's harmless to use this wrapper in any case.

Since:
19 Nov 2013
Author:
Mark Taylor

Constructor Summary
GuiNavigationListener(PlotPanel<?,A> plotPanel)
          Constructor.
 
Method Summary
 Iterable<double[]> createDataPosIterable(Point pos)
           
protected abstract  uk.ac.starlink.ttools.plot2.Navigator<A> getExistingNavigator(int isurf)
          Returns the navigator for a surface that is actually known by this listener.
 uk.ac.starlink.ttools.plot2.Navigator<A> getNavigator(int isurf)
           
 uk.ac.starlink.ttools.plot2.Surface getSurface(int isurf)
           
 int getSurfaceIndex(Point pos)
          May return a negative value if no surface corresponds to the given point.
protected  void handleClick(uk.ac.starlink.ttools.plot2.Navigator<A> navigator, int isurf, Point pos, int ibutt, Iterable<double[]> dposIt)
           
 
Methods inherited from class uk.ac.starlink.ttools.plot2.NavigationListener
addListeners, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, removeListeners, setAspect, setDecoration, updateDecoration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiNavigationListener

public GuiNavigationListener(PlotPanel<?,A> plotPanel)
Constructor.

Parameters:
plotPanel - plot panel
Method Detail

getSurfaceIndex

public int getSurfaceIndex(Point pos)
May return a negative value if no surface corresponds to the given point.

Specified by:
getSurfaceIndex in class uk.ac.starlink.ttools.plot2.NavigationListener<A>

getSurface

public uk.ac.starlink.ttools.plot2.Surface getSurface(int isurf)
Specified by:
getSurface in class uk.ac.starlink.ttools.plot2.NavigationListener<A>

getNavigator

public uk.ac.starlink.ttools.plot2.Navigator<A> getNavigator(int isurf)
Specified by:
getNavigator in class uk.ac.starlink.ttools.plot2.NavigationListener<A>

getExistingNavigator

protected abstract uk.ac.starlink.ttools.plot2.Navigator<A> getExistingNavigator(int isurf)
Returns the navigator for a surface that is actually known by this listener.

Parameters:
isurf - surface index, >=0
Returns:
navigator for given surface index

handleClick

protected void handleClick(uk.ac.starlink.ttools.plot2.Navigator<A> navigator,
                           int isurf,
                           Point pos,
                           int ibutt,
                           Iterable<double[]> dposIt)
Overrides:
handleClick in class uk.ac.starlink.ttools.plot2.NavigationListener<A>

createDataPosIterable

public Iterable<double[]> createDataPosIterable(Point pos)
Specified by:
createDataPosIterable in class uk.ac.starlink.ttools.plot2.NavigationListener<A>


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