Package Spectrogram

Class SpectrogramDisplay

All Implemented Interfaces:
EventListener, InternalFrameListener, DisplayPanelContainer, PamSettings, SettingsNameProvider, LoadObserver, PamObserver, SpectrogramParametersUser

  • Field Details Link icon

    • panelClipBoardCopier Link icon

      protected ClipboardCopier panelClipBoardCopier
    • mousePressedButton Link icon

      public int mousePressedButton
  • Constructor Details Link icon

  • Method Details Link icon

    • getObserverObject Link icon

      public PamObserver getObserverObject()
      Specified by:
      getObserverObject in interface PamObserver
      Returns:
      the actual observer. In most cases concrete classes will just return 'this' in response. The exception is the Threaded observer, which will return the single thread observer.
    • getName Link icon

      public String getName()
      Description copied from class: PamFramePlots
      Get a unique name for the display
      Overrides:
      getName in class UserFramePlots
      Returns:
      a unique name for the display.
    • setAmplitudeParams Link icon

      public void setAmplitudeParams()
      Called when amplitude range is changed on the hiding amplitude range slider.
    • calcFrequencyRangeDisplay Link icon

      public void calcFrequencyRangeDisplay()
      Checks the frequency range range to be displayed.
    • setParams Link icon

      public void setParams(SpectrogramParameters newParameters, boolean fullLayout)
    • getFullTitle Link icon

      public String getFullTitle()
    • getFrameTitle Link icon

      public String getFrameTitle()
    • repaintAll Link icon

      public void repaintAll()
    • getFrozenImageWidth Link icon

      public int getFrozenImageWidth()
      Width of the window thats being drawn on - not the number of pixels, though these may often be the same.
      Returns:
      the width of the final rendered image in pixels
    • getDisplayWidth Link icon

      public int getDisplayWidth()
      Returns:
      With of the display panels in pixels.
    • getImageHeight Link icon

      public int getImageHeight()
      Returns:
      half the fft length. Always draw the full image then select a portion as it's rendered onto the screen (if zoomed).
    • createAllImages Link icon

      public void createAllImages()
      Called whenever the display size changes so that buffered images can be recreated.
    • createColours Link icon

      protected boolean createColours()
    • setSampleRate Link icon

      public void setSampleRate(float sampleRate, boolean notify)
      Description copied from interface: PamObserver
      New sample rate
      Specified by:
      setSampleRate in interface PamObserver
      Parameters:
      sampleRate -
      notify - Notify other PamObservers and PamObservables in the chain.
    • masterClockUpdate Link icon

      public void masterClockUpdate(long milliSeconds, long sampleNumber)
      Specified by:
      masterClockUpdate in interface PamObserver
    • PamToStart Link icon

      public void PamToStart()
    • getRequiredDataHistory Link icon

      public long getRequiredDataHistory(PamObservable o, Object arg)
      Required data history depends on what's happening with the mouse. If the mouse is doing nothing and there are no SpectrogramMarkObservers then no data needs to be stored for drawing the spectrogram. If there are mark observers and the mouse is up, then make sure that at least one screen full of data is always in memory (both FFT data and Raw wave data). If the mouse is down, then keep the maximum of either one screen full of from whenever the mouse was pressed - the use may hold it down for a long time !
      Specified by:
      getRequiredDataHistory in interface PamObserver
      Parameters:
      arg - optional argument from PamObservable
      Returns:
      time in milliseconds required by data held in PamObservable
      See Also:
    • getObserverName Link icon

      public String getObserverName()
      Specified by:
      getObserverName in interface PamObserver
    • addData Link icon

      public void addData(PamObservable obs, PamDataUnit newData)
      Description copied from interface: PamObserver
      Informs the PamObserver that new data have been added to the Observable class
      Specified by:
      addData in interface PamObserver
    • updateData Link icon

      public void updateData(PamObservable observable, PamDataUnit pamDataUnit)
      Description copied from interface: PamObserver
      Informs the PamObserver that existing data have been updated
      Specified by:
      updateData in interface PamObserver
    • receiveSourceNotification Link icon

      public void receiveSourceNotification(int type, Object object)
      Description copied from interface: PamObserver
      Receive a notification from the data source - typically a change in DAQ status. See the constants listed in AcquisitionProcess for potential change types.
      Specified by:
      receiveSourceNotification in interface PamObserver
      Parameters:
      type - the type of change
      object - generic object added here so that we can include anything in the future
    • setLoadStatus Link icon

      public void setLoadStatus(int loadState)
      Specified by:
      setLoadStatus in interface LoadObserver
    • setSettings Link icon

      public void setSettings()
    • getSpectrogramParameters Link icon

      public SpectrogramParameters getSpectrogramParameters()
      Specified by:
      getSpectrogramParameters in interface SpectrogramParametersUser
    • setSpectrogramParameters Link icon

      public void setSpectrogramParameters(SpectrogramParameters spectrogramParameters)
      Specified by:
      setSpectrogramParameters in interface SpectrogramParametersUser
    • getFFTDataBlock Link icon

      public FFTDataBlock getFFTDataBlock()
      Specified by:
      getFFTDataBlock in interface SpectrogramParametersUser
    • specMouseOffline Link icon

      public void specMouseOffline(Spectrogram.SpectrogramDisplay.SpectrogramPanel spectrogramPanel, Point point)
      Called when the spectrogrammouse is moved or pressed in viewer mode.
      Parameters:
      spectrogramPanel -
      point -
    • notifyModelChanged Link icon

      public void notifyModelChanged(int changeType)
      Specified by:
      notifyModelChanged in class UserFramePlots
    • internalFrameClosing Link icon

      public void internalFrameClosing(InternalFrameEvent e)
      Specified by:
      internalFrameClosing in interface InternalFrameListener
      Overrides:
      internalFrameClosing in class UserFramePlots
    • noteNewSettings Link icon

      public void noteNewSettings()
      Specified by:
      noteNewSettings in interface PamObserver
    • removeObservable Link icon

      public void removeObservable(PamObservable o)
      Description copied from interface: PamObserver
      called when an Observable (PamDataBlock) is removed from the system
      Specified by:
      removeObservable in interface PamObserver
    • getCurrentXPixel Link icon

      public double getCurrentXPixel()
      Get the current X pixel in screen (not image) coordinates.
      In viewer mode, this is always 0; in normal operation, the following rules apply:
      If it's wrapping, then the current pixel is the current imagePos scaled by the ratio of the panel width to the image width.
      If it's scrolling, then it's just the panel width.
      Specified by:
      getCurrentXPixel in interface DisplayPanelContainer
    • getCurrentXTime Link icon

      public long getCurrentXTime()
      Get the current time, i.e. the time at the cursor in milliseconds. If there is a frozen image, this is the time of the when it was frozen.
      Specified by:
      getCurrentXTime in interface DisplayPanelContainer
    • wrapDisplay Link icon

      public boolean wrapDisplay()
      Specified by:
      wrapDisplay in interface DisplayPanelContainer
      Returns:
      true if the display wraps (rather than scrolls).
    • getXDuration Link icon

      public double getXDuration()
      Description copied from interface: DisplayPanelContainer
      get the display duration in milliseconds
      Specified by:
      getXDuration in interface DisplayPanelContainer
      Returns:
      the display length in milliseconds.
    • panelNotify Link icon

      public void panelNotify(int noteType)
      Description copied from interface: DisplayPanelContainer
      notification from a display panel that it's necessary to perform some action - such as redrawing axis.
      Specified by:
      panelNotify in interface DisplayPanelContainer
      Parameters:
      noteType -
    • getFrameType Link icon

      public int getFrameType()
      Specified by:
      getFrameType in class UserFramePlots
    • getSourceFFTDataBlock Link icon

      public FFTDataBlock getSourceFFTDataBlock()
    • getSourceRawDataBlock Link icon

      public PamRawDataBlock getSourceRawDataBlock()
    • playViewerSound Link icon

      public void playViewerSound()
      Should receive play commands from the top toolbar.
    • getColourArray Link icon

      public ColourArray getColourArray()
      Returns:
      the colourArray
    • getUnitName Link icon

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      the overlayMarker
    • getUnitType Link icon

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

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

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

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Parameters:
      pamControlledUnitSettings -
      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
    • getDataSelectorName Link icon

      public String getDataSelectorName(int panelId)
    • getOverlayDataInfo Link icon

      public OverlayDataInfo getOverlayDataInfo(PamDataBlock dataBlock, int panelId)