jAudioFeatureExtractor.actions
Class SamplingRateAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by jAudioFeatureExtractor.actions.SamplingRateAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class SamplingRateAction
extends javax.swing.AbstractAction

Action handling changes in the sample rate.

Author:
Daniel McEnnis
See Also:
Serialized Form

Field Summary
 javax.swing.JRadioButtonMenuItem[] samplingRates
          references to the radio buttons representing the range of possible sample rates.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
SamplingRateAction()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          stores an index to the currently selected sampling rate.
 double getSamplingRate()
          Returns the sample rate as an double representing samples per second.
 int getSelected()
          Return the integer index into the array of radio buttons that corresponds to the selected sampling rate.
 void setSelected(int i)
          Allows the initial settings of the radiobuttons.
 void setTarget(javax.swing.JRadioButtonMenuItem[] s)
          Sets references to the RadioButtons for sampling rate.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

samplingRates

public javax.swing.JRadioButtonMenuItem[] samplingRates
references to the radio buttons representing the range of possible sample rates.

Constructor Detail

SamplingRateAction

public SamplingRateAction()
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
stores an index to the currently selected sampling rate.


setTarget

public void setTarget(javax.swing.JRadioButtonMenuItem[] s)
Sets references to the RadioButtons for sampling rate.

Parameters:
s -

getSelected

public int getSelected()
Return the integer index into the array of radio buttons that corresponds to the selected sampling rate.

Returns:
the index to the selected sampling rate

getSamplingRate

public double getSamplingRate()
Returns the sample rate as an double representing samples per second.

Returns:
sampling rate as a double

setSelected

public void setSelected(int i)
Allows the initial settings of the radiobuttons.

Parameters:
i - which button is to be selected.