Class AudioControl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener

public class AudioControl extends DisplayControlImpl
Class AudioControl Plays and records audio
Version:
$Revision: 1.10 $
Author:
IDV Development Team
  • Constructor Details

    • AudioControl

      public AudioControl()
      Dummy ctor
  • Method Details

    • init

      public boolean init(DataChoice dataChoice) throws VisADException, RemoteException
      Called to make this kind of Display Control; This method is called from inside DisplayControlImpl init(several args).
      Overrides:
      init in class DisplayControlImpl
      Parameters:
      dataChoice - the DataChoice of the moment.
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • initDone

      public void initDone()
      Initialization is done
      Overrides:
      initDone in class DisplayControlImpl
    • doRemove

      public void doRemove() throws RemoteException, VisADException
      Remove the control
      Specified by:
      doRemove in interface DisplayControl
      Overrides:
      doRemove in class DisplayControlImpl
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getTitle

      protected String getTitle()
      Overwrite the base class method to return the recordFilename or url.
      Overrides:
      getTitle in class DisplayControlImpl
      Returns:
      The recordFilename or url as the title.
    • doMakeContents

      protected Container doMakeContents() throws VisADException, RemoteException
      Make the gui
      Overrides:
      doMakeContents in class DisplayControlImpl
      Returns:
      The gui
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • handleRecordBtn

      public void handleRecordBtn()
      Record button pressed
    • stopRecording

      public void stopRecording()
      Stop recording
    • selectRecordFile

      public void selectRecordFile()
      Select a file to record to
    • selectPlayFile

      public void selectPlayFile()
      Select a file to play
    • startRecording

      public void startRecording()
      Start recording
    • setRecordFilename

      public void setRecordFilename(String value)
      Set the Filename property.
      Parameters:
      value - The new value for Filename
    • getRecordFilename

      public String getRecordFilename()
      Get the Filename property.
      Returns:
      The Filename
    • setPlayFilename

      public void setPlayFilename(String value)
      Set the Filename property.
      Parameters:
      value - The new value for Filename
    • getPlayFilename

      public String getPlayFilename()
      Get the Filename property.
      Returns:
      The Filename
    • setSaveAudio

      public void setSaveAudio(boolean value)
      Set the SaveAudio property.
      Parameters:
      value - The new value for SaveAudio
    • getSaveAudio

      public boolean getSaveAudio()
      Get the SaveAudio property.
      Returns:
      The SaveAudio
    • setAudioBytes

      public void setAudioBytes(byte[] value)
      Set the AudioBytes property.
      Parameters:
      value - The new value for AudioBytes
    • getAudioBytes

      public byte[] getAudioBytes() throws IOException
      Get the AudioBytes property.
      Returns:
      The AudioBytes
      Throws:
      IOException - On badness