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.util.function.Supplier<uk.ac.starlink.ttools.plot2.CoordSequence>createDataPosSupplier(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.SurfacegetSurface(int isurf)intgetSurfaceIndex(java.awt.Point pos)May return a negative value if no surface corresponds to the given point.protected voidhandleClick(uk.ac.starlink.ttools.plot2.Navigator<A> navigator, int isurf, java.awt.Point pos, int ibutt, java.util.function.Supplier<uk.ac.starlink.ttools.plot2.CoordSequence> dposSupplier)
-
-
-
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:
getSurfaceIndexin classuk.ac.starlink.ttools.plot2.NavigationListener<A>
-
getSurface
public uk.ac.starlink.ttools.plot2.Surface getSurface(int isurf)
- Specified by:
getSurfacein classuk.ac.starlink.ttools.plot2.NavigationListener<A>
-
getNavigator
public uk.ac.starlink.ttools.plot2.Navigator<A> getNavigator(int isurf)
- Specified by:
getNavigatorin classuk.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.util.function.Supplier<uk.ac.starlink.ttools.plot2.CoordSequence> dposSupplier)
- Overrides:
handleClickin classuk.ac.starlink.ttools.plot2.NavigationListener<A>
-
createDataPosSupplier
public java.util.function.Supplier<uk.ac.starlink.ttools.plot2.CoordSequence> createDataPosSupplier(java.awt.Point pos)
- Specified by:
createDataPosSupplierin classuk.ac.starlink.ttools.plot2.NavigationListener<A>
-
-