Class GuiNavigationListener<A>

java.lang.Object
uk.ac.starlink.ttools.plot2.NavigationListener<A>
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

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Supplier<uk.ac.starlink.ttools.plot2.CoordSequence>
     
    protected abstract uk.ac.starlink.ttools.plot2.Navigator<A>
    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
    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, Supplier<uk.ac.starlink.ttools.plot2.CoordSequence> dposSupplier)
     

    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 Details

    • GuiNavigationListener

      public GuiNavigationListener(PlotPanel<?,A> plotPanel)
      Constructor.
      Parameters:
      plotPanel - plot panel
  • Method Details

    • 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, Supplier<uk.ac.starlink.ttools.plot2.CoordSequence> dposSupplier)
      Overrides:
      handleClick in class uk.ac.starlink.ttools.plot2.NavigationListener<A>
    • createDataPosSupplier

      public Supplier<uk.ac.starlink.ttools.plot2.CoordSequence> createDataPosSupplier(Point pos)
      Specified by:
      createDataPosSupplier in class uk.ac.starlink.ttools.plot2.NavigationListener<A>