Class ScrollJumper

java.lang.Object
pamScrollSystem.jumping.ScrollJumper
All Implemented Interfaces:
PamSettings, SettingsNameProvider, PamMenuParts
Direct Known Subclasses:
SpectrogramScrollJumper

public class ScrollJumper extends Object implements PamMenuParts, PamSettings
Scroll jumper allows the use of arrow keys to move to the next data unit. How it finds that data unit is TBD, but might involve scanning all data blocks added to the current scroller for the next data unit after a given time, or something like that. Can also use data filters though need to think if it's using the same ones as on the display or different ones.
Author:
dg50
  • Constructor Details

  • Method Details

    • getUsedDataBlocks

      public List<PamDataBlock> getUsedDataBlocks()
      Get a list of datablocks to search for the next or previous data unit By default this is the list of data blocks subscribed to the scroller, but you may want to override this, e.g. in the spectrogram only return the list that's used by the display panel last clicked on.
      Returns:
      list of datablocks.
    • getDataSelector

      public DataSelector getDataSelector(PamDataBlock dataBlock)
      Get a data selector for the datablock of interest. by default this is null, but specific displays may want to override this so that they can use the data selector currently active on that display.
      Parameters:
      dataBlock -
      Returns:
      data selector
    • addMenuItems

      public int addMenuItems(JComponent parentComponent)
      Description copied from interface: PamMenuParts
      Add menu items to a menu or popup menu.
      Specified by:
      addMenuItems in interface PamMenuParts
      Parameters:
      parentComponent - menu to add to
      Returns:
      number of items added
    • getUnitName

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • getSettingsReference

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • restoreSettings

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • getParentScroller

      public AbstractPamScroller getParentScroller()
      Returns:
      the parentScroller
    • getScrollJumpParams

      public ScrollJumpParams getScrollJumpParams()
      Returns:
      the scrollJumpParams
    • getLastFoundDataUnit

      public PamDataUnit getLastFoundDataUnit()
      Returns:
      the lastFoundDataUnit
    • notifySelectObservers

      public void notifySelectObservers()
      Notify selection observers when a new data unit is selected May be sending out null's !
    • addSelectObserver

      public void addSelectObserver(SimpleDataObserver simpleObserver)
      Add an observer which will get notifications whenever the selected data unit changes.
      Parameters:
      simpleObserver -
    • removeSelectObserver

      public boolean removeSelectObserver(SimpleDataObserver simpleObserver)
      Remove an observer which got notifications whenever the selected data unit changes.
      Parameters:
      simpleObserver -