Class SpectrogramPlotInfo

java.lang.Object
dataPlots.data.TDDataInfo
fftManager.newSpectrogram.SpectrogramPlotInfo
All Implemented Interfaces:
HidingDialogChangeListener, SpectrogramParametersUser

public class SpectrogramPlotInfo extends TDDataInfo implements SpectrogramParametersUser, HidingDialogChangeListener
  • Constructor Details

  • Method Details

    • getHidingDialogComponent

      public HidingDialogComponent getHidingDialogComponent()
      Description copied from class: TDDataInfo
      Return a hiding dialog component which will get incorporated into a larger tabbed sliding dialog.
      Overrides:
      getHidingDialogComponent in class TDDataInfo
      Returns:
      sliding dialog component.
    • removeData

      public void removeData()
      Description copied from class: TDDataInfo
      Called whenever a data line is removed from a graph, or when a graph is removed from a plot.
      Is a good opportunity for the DataInfo to unsubscribe itself from any datablocks it might be observing.
      Overrides:
      removeData in class TDDataInfo
    • newFFTData

      public void newFFTData(FFTDataUnit fftDataUnit)
      Called when new FFT data arrive.
      Parameters:
      fftDataUnit -
    • getDataValue

      public Double getDataValue(PamDataUnit pamDataUnit)
      Description copied from class: TDDataInfo
      Gets a value for a specific data unit which should be in the same units as the scale information. This will then be converted into a plot position by the TDGraph.
      Specified by:
      getDataValue in class TDDataInfo
      Returns:
      data value or null if this data poit should not be plotted.
    • getSymbolChooser

      public TDSymbolChooser getSymbolChooser()
      Specified by:
      getSymbolChooser in class TDDataInfo
      Returns:
      a class containing functions to chose a symbol to plot.
    • drawData

      public void drawData(int plotNumber, Graphics g, Rectangle windowRect, int orientation, PamAxis timeAxis, long scrollStart, PamAxis graphAxis)
      Description copied from class: TDDataInfo
      Paint data into the graphics window.
      Overrides:
      drawData in class TDDataInfo
      Parameters:
      plotNumber - plot number
      g - graphics
      windowRect - Window rectangle to draw in
      orientation - orientation
      graphAxis - graph data axis for scaling.
    • hasOptions

      public boolean hasOptions()
      Description copied from class: TDDataInfo
      Has options that will result in a dialog.
      Overrides:
      hasOptions in class TDDataInfo
      Returns:
      true if there are options.
    • editOptions

      public boolean editOptions(Window frame)
      Description copied from class: TDDataInfo
      Edit options - generally involves throwing up a dialog of some sort.
      Overrides:
      editOptions in class TDDataInfo
      Returns:
      true if options dialog OK button was pressed.
    • getScaleInformation

      public TDScaleInfo getScaleInformation(int orientation, boolean autoScale)
      Overrides:
      getScaleInformation in class TDDataInfo
      Returns:
      Information about the scales of the data.
    • getFixedScaleInformation

      public TDScaleInfo getFixedScaleInformation(int orientation)
      Overrides:
      getFixedScaleInformation in class TDDataInfo
      Returns:
      the fixedScaleInformation
    • getStoredSettings

      public Serializable getStoredSettings()
      Description copied from class: TDDataInfo
      Get an object that will be packed up with the serialised settings when information about a plot get's stored.
      The Object MUST implement serializable and ideally also cloneable or it will go belly up !
      This only gets called when settings are to be saved so there is no need to keep parameters this returns up to date except right at settings save time (when this is called)
      Overrides:
      getStoredSettings in class TDDataInfo
      Returns:
      serializable object to save.
    • setStoredSettings

      public boolean setStoredSettings(Serializable storedSettings)
      Description copied from class: TDDataInfo
      Set settings which have been read back from storage (the psf file). Assume these are of the right type and cast into whatever is needed !
      Overrides:
      setStoredSettings in class TDDataInfo
      Returns:
      true if all OK.
    • getTdControl

      public TDControl getTdControl()
      Returns:
      the tdControl
    • getFftDataBlock

      public FFTDataBlock getFftDataBlock()
      Returns:
      the fftDataBlock
    • getColours

      public double[] getColours(double dBLevel)
      Get the colour triplet for a particular db value.
      Parameters:
      dBLevel -
      Returns:
      colour triplet.
    • getSpectrogramParameters

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

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

      public FFTDataBlock getFFTDataBlock()
      Specified by:
      getFFTDataBlock in interface SpectrogramParametersUser
    • timeScrollValueChanged

      public void timeScrollValueChanged(long valueMillis)
      Description copied from class: TDDataInfo
      Called in viewer mode when the time scroller moves.

      Most data won't need to do anything here since they are already subscribed to the scroller and will get their data loaded from psf automatically.

      Overrides:
      timeScrollValueChanged in class TDDataInfo
      Parameters:
      valueMillis - new scroll value in millis
    • timeScrollRangeChanged

      public void timeScrollRangeChanged(long minimumMillis, long maximumMillis)
      Description copied from class: TDDataInfo
      Called in viewer mode when the time scroll range moves.

      Most data won't need to do anything here since they are already subscribed to the scroller and will get their data loaded from psf automatically.

      Overrides:
      timeScrollRangeChanged in class TDDataInfo
      Parameters:
      minimumMillis - new minimum in millis
      maximumMillis - new maximum in millis.
    • timeRangeSpinnerChange

      public void timeRangeSpinnerChange(double oldValue, double newValue)
      Description copied from class: TDDataInfo
      Called when the time range spinner on the main display panel changes.
      Overrides:
      timeRangeSpinnerChange in class TDDataInfo
      Parameters:
      oldValue - old value (seconds)
      newValue - new value (seconds)
    • dialogChanged

      public void dialogChanged(int changeLevel, Object object)
      Description copied from interface: HidingDialogChangeListener
      Notification from a sliding dialog panel when something changes.
      Specified by:
      dialogChanged in interface HidingDialogChangeListener
      Parameters:
      changeLevel - quick way of indicating levels of change.

      -ve numbers are used by the system. +ve ones can be used by programmer in a dialog specific context.

      object - an object if you need to send other information.