Package Spectrogram

Interface SpectrogramMarkObserver

All Known Implementing Classes:
ClipProcess, IshLocHyperbProcess, IshLocPairProcess, IshLocProcess, RoccaWhistleSelect, SpectrogramMarkProcess

public interface SpectrogramMarkObserver
Class to receive notifications when the mouse is dragged across the spectrogram display Get's called on mouse down and mouse up.
Author:
dg50
  • Field Details

  • Method Details

    • spectrogramNotification

      boolean spectrogramNotification(SpectrogramDisplay display, MouseEvent mouseEventFX, int downUp, int channel, long startMilliseconds, long duration, double f1, double f2, TDGraphFX tdDisplay)
      Receive notifications from the spectrogram display when the mouse is pressed and dragged on the display.

      Modified, 3 Jan 2014 to be sent for all buttons. Button number is coded into high word of downUp. Normal Java button numbers are 1,2,3. The actual code used is downUp = oldDownUp + (button-1) << 16 so existing button1 commands will not be affected in any way but it's now possible to program up more advanced responses based on other buttons.

      Modified 5/8/2020 - added TDGraphFX object. When a mark is made on a TD Display, the SpectrogramDisplay object is null. Adding the TDGraphFX object allows the Mark Observers to still have access to the underlying data blocks

      Parameters:
      display - spectrogram display
      downUp - 0 = mouse down, 1 = mouse up, 2 = drag + button number in upper 16 bits.
      channel - channel or sequence number, depending on the source
      startMilliseconds - start time in milliseconds.
      duration - duration in milliseconds.
      f1 - min frequency in Hz
      f2 - max frequency in Hz
      mouseEvent - Full mouse event - allows more flexibility in user functions
      sourceDataBlock - the data block
      Returns:
      true if the user has popped up a menu or done something that should stop the sending display from carrying out any further actions on this mouse action (put in place to prevent the spectrogram menu popping up when editing marks in viewer mode).
    • getMarkObserverName

      String getMarkObserverName()
      Returns:
      Name for the mark observer to show in the spectrogram dialog.
    • canMark

      boolean canMark()
      Returns:
      whether or not it's possible to use this marker. Generally false when in viewer mode, but maynot always be.
    • getMarkName

      String getMarkName()
      Name of the mark. Observers may have several mark types and might want to change the name to indicate what action will be taken when a mark is made
      Returns: