jAudioFeatureExtractor.actions
Class OutputTypeAction

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

public class OutputTypeAction
extends javax.swing.AbstractAction

Action responsible for processing when a user changes from either ACE or ARFF output format from the menu bar.

Author:
Daniel McEnnis
See Also:
Serialized Form

Field Summary
 
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
OutputTypeAction()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          When an output type is selected, change the output type to match and check against inconsistant states.
 java.lang.String getOutputType()
          Provide a human friendly version of the outputType variable
 int getSelected()
          Return the integer value corresponding to the current output type selected
 void setSelected(int i)
          Set the current selected state.
 void setTarget(javax.swing.JRadioButtonMenuItem ace, javax.swing.JRadioButtonMenuItem arff, javax.swing.JCheckBox perWindow, javax.swing.JCheckBox overall)
          Sets all the references needed to check for invalid state combinations
 
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
 

Constructor Detail

OutputTypeAction

public OutputTypeAction()
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
When an output type is selected, change the output type to match and check against inconsistant states.


setTarget

public void setTarget(javax.swing.JRadioButtonMenuItem ace,
                      javax.swing.JRadioButtonMenuItem arff,
                      javax.swing.JCheckBox perWindow,
                      javax.swing.JCheckBox overall)
Sets all the references needed to check for invalid state combinations

Parameters:
ace - "ACE" radio button
arff - "ARFF" radio button
perWindow - should features be saved for each window
overall - should global features be saved

getOutputType

public java.lang.String getOutputType()
Provide a human friendly version of the outputType variable

Returns:
either ACE or ARFF depending on the currently selected value.

getSelected

public int getSelected()
Return the integer value corresponding to the current output type selected

Returns:
integer value corresponding to the currently selected output type

setSelected

public void setSelected(int i)
Set the current selected state. Invalid values are mapped to ARFF.

Parameters:
i - integer representing the desired output type.