Package Spectrogram

Class SpectrogramZoomer

java.lang.Object
Spectrogram.SpectrogramZoomer
All Implemented Interfaces:
Zoomable

public class SpectrogramZoomer extends Object implements Zoomable
The Spectrogram Zoomer acts as the class which handles all zoomer functionality. The zoomer is assocaited with a particular spectrogramPanel.
Author:
Jamie Macaulay
  • Constructor Details

    • SpectrogramZoomer

      public SpectrogramZoomer(SpectrogramDisplay spectrogramDisplay, Spectrogram.SpectrogramDisplay.SpectrogramPanel spectroPanel)
  • Method Details

    • canStartZoomArea

      public boolean canStartZoomArea(MouseEvent mouseEvent)
      Description copied from interface: Zoomable
      Can a zoom area be started ?

      This is called from the zoomer when a zoom area is about to start to check that there are not reasons for not starting the area. For instance if some other mouse event is to take priority over the zoom, e.g. clicking on a detection which might initiate some other menu action.

      Specified by:
      canStartZoomArea in interface Zoomable
      Returns:
      true if zooming can start
    • zoomShapeChanging

      public void zoomShapeChanging(ZoomShape zoomShape)
      Description copied from interface: Zoomable
      Called as the zoom shape changes via some sort of mouse action.
      Specified by:
      zoomShapeChanging in interface Zoomable
      Parameters:
      zoomShape - shape that's changing.
    • isComplete

      public boolean isComplete()
    • setComplete

      public void setComplete(boolean complete)
    • zoomPolygonComplete

      public void zoomPolygonComplete(ZoomShape zoomShape)
      Description copied from interface: Zoomable
      Called when a zoom shape has been completed.
      Specified by:
      zoomPolygonComplete in interface Zoomable
      Parameters:
      zoomShape - zoom shape that's completed.
    • getXStart

      public double getXStart()
      Specified by:
      getXStart in interface Zoomable
      Returns:
      start (left most) value on the x axis scale
    • getXScale

      public double getXScale()
      Specified by:
      getXScale in interface Zoomable
      Returns:
      x scale in pixels per unit
    • getXRange

      public double getXRange()
      Specified by:
      getXRange in interface Zoomable
      Returns:
      range of x axis
    • getYStart

      public double getYStart()
      Specified by:
      getYStart in interface Zoomable
      Returns:
      start (bottom most) value on the y axis scale
    • getYScale

      public double getYScale()
      Specified by:
      getYScale in interface Zoomable
      Returns:
      y scale in pixels per unit
    • getYRange

      public double getYRange()
      Specified by:
      getYRange in interface Zoomable
      Returns:
      the range of the y axis
    • getCoordinateType

      public int getCoordinateType()
      Specified by:
      getCoordinateType in interface Zoomable
      Returns:
      the coordinate type - can be pretty much anything so long as it is unique for different types of coordinate for that display, e.g. the Click bearing time display so that zooming can only take place in that coordinate system.
    • zoomToShape

      public void zoomToShape(ZoomShape zoomShape)
      Description copied from interface: Zoomable
      Zoom to the bounds of a particular shape.
      Specified by:
      zoomToShape in interface Zoomable
      Parameters:
      zoomShape - shape to zoom to
    • canClearZoomShape

      public boolean canClearZoomShape(MouseEvent mouseEvent)
      Specified by:
      canClearZoomShape in interface Zoomable
      Returns: