Package Acquisition

Class AcquisitionDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class AcquisitionDialog extends PamDialog
Main dialog for acquisition control. Takes plug in panels from the various sound systems to give more device specific controls where necessary.
Author:
Doug Gillespie
See Also:
  • Method Details

    • clearInstance

      public static void clearInstance()
      Clear the static instance so that the dialog is totally rebuilt next time it's launched.
    • showDialog

      public static AcquisitionParameters showDialog(Frame parentFrame, AcquisitionControl daqControl, AcquisitionParameters oldParams)
      Shows the data acquisition dialog.
      Parameters:
      daqControl - the calling AcquisitionControl
      oldParams - current parameters from the AcquisitionControl
      Returns:
      new parameters selected in the dialog
      See Also:
    • setSampleRate

      public void setSampleRate(float sampleRate)
      Called by the specific DaqSystem to set sample rate when it is set by the DaqSystem (for instance FileInputSystem will set sample rate to the sample rate of data in the current file.
      Parameters:
      sampleRate - Current sample rate
    • getSampleRate

      public Double getSampleRate()
      Get the sample rate, or null if sample rate is not a valid number
      Returns:
      sample rate or null
    • setChannels

      public void setChannels(int nChannels)
      Called by the specific DaqSystem to set the number of channels when it is set by the DaqSystem (for instance FileInputSystem will set it to the number of channels in the current file.
      Parameters:
      nChannels - Number of channels
    • getChannels

      public Integer getChannels()
      Returns:
      the number of channels or null if invalid number
    • setPreampGain

      public void setPreampGain(double gain)
    • setVPeak2Peak

      public void setVPeak2Peak(double vPeak2Peak)
      Called by the specific DaqSystem to set the peak to peak voltage range. This is used for calculating absolute SPL's in various detectors the DaqSystem
      Parameters:
      vPeak2Peak - Peak to Peak input voltage
    • getParams

      public boolean getParams()
      Description copied from class: PamDialog
      called when the Ok button is pressed. This must return true in order that the dialog may close. It should also copy all parameters into an object that will be returned by showDialog.
      Specified by:
      getParams in class PamDialog
    • readSampleRate

      public double readSampleRate()
      Read the latest sample rate value.
      Returns:
      sample rate Hz.
    • cancelButtonPressed

      public void cancelButtonPressed()
      Description copied from class: PamDialog
      called when the cancel button is pressed before the dialog closes. Generally you should set the parameters returned by the dialog to null or some default value, or in some other way indicate that Cancel was pressed.
      Specified by:
      cancelButtonPressed in class PamDialog
    • restoreDefaultSettings

      public void restoreDefaultSettings()
      Description copied from class: PamDialog
      standard function which should us used to copy default parameters into the dialog controls.
      Specified by:
      restoreDefaultSettings in class PamDialog
    • getCurrentDaqSystem

      public DaqSystem getCurrentDaqSystem()
    • getSampleRateComponent

      public JTextField getSampleRateComponent()
      Returns:
      the sample rate component
    • getnChanComponent

      public JTextField getnChanComponent()
      Returns:
      the nChannels component.