Package uk.ac.starlink.topcat.plot2

## Class GuiNavigationListener<A>

- java.lang.Object
- - uk.ac.starlink.ttools.plot2.NavigationListener<A>
  - - uk.ac.starlink.topcat.plot2.GuiNavigationListener<A>

- All Implemented Interfaces:
    `java.awt.event.MouseListener`, `java.awt.event.MouseMotionListener`, `java.awt.event.MouseWheelListener`, `java.util.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
    --- | ---
    `GuiNavigationListener​(PlotPanel<?,A> plotPanel)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Iterable<double[]>` | `createDataPosIterable​(java.awt.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​(java.awt.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, java.awt.Point pos, int ibutt, java.lang.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​(java.awt.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,
                                     java.awt.Point pos,
                                     int ibutt,
                                     java.lang.Iterable<double[]> dposIt)

      Overrides:
        `handleClick` in class `uk.ac.starlink.ttools.plot2.NavigationListener<A>`

    - #### createDataPosIterable

          public java.lang.Iterable<double[]> createDataPosIterable​(java.awt.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.