jAudioFeatureExtractor.actions
クラス AddRecordingAction

java.lang.Object
  上位を拡張 javax.swing.AbstractAction
      上位を拡張 jAudioFeatureExtractor.actions.AddRecordingAction
すべての実装されたインタフェース:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class AddRecordingAction
extends javax.swing.AbstractAction

Action for importing audio files into jAudio.

作成者:
Daniel McEnnis
関連項目:
直列化された形式

フィールドの概要
 
クラス javax.swing.AbstractAction から継承されたフィールド
changeSupport, enabled
 
インタフェース javax.swing.Action から継承されたフィールド
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
コンストラクタの概要
AddRecordingAction()
          Generic constructor that provides menu item text.
 
メソッドの概要
 void actionPerformed(java.awt.event.ActionEvent e)
          Instantiates a JFileChooser for the load_recording_chooser field if one does not already exist.
 void addRecording(java.io.File[] toBeAdded)
          Adds the given files to the table display and stores a reference to them.
 void setModel(Controller c)
          AddRecordingAction requires access to the table where recordings are stored.
 
クラス javax.swing.AbstractAction から継承されたメソッド
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
クラス java.lang.Object から継承されたメソッド
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AddRecordingAction

public AddRecordingAction()
Generic constructor that provides menu item text.

メソッドの詳細

setModel

public void setModel(Controller c)
AddRecordingAction requires access to the table where recordings are stored. This method supplies that context.

パラメータ:
c - near global controller object

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Instantiates a JFileChooser for the load_recording_chooser field if one does not already exist. This dialog box allows the user to choose one or more files to add to the recording_list list of references to audio file and display the added files on the recordings_table.

Only audio files of known types (i.e. with known extensions) are displayed in the file chooser.

Verifies that the files are valid audio files that can be read if the validate_recordings_when_load_them_check_box checkbox is selected. Only stores the actual samples if the store_audio_samples_check_box check box is selected (otherwise just stores file references).

If a selected file path corresponds to a file that does not exist, then an error message is displayed.


addRecording

public void addRecording(java.io.File[] toBeAdded)
                  throws java.lang.Exception
Adds the given files to the table display and stores a reference to them. Ignores files that have already been added to the table.

Verifies that the files are valid audio files that can be read if the validate_recordings_when_load_them_check_box checkbox is selected. Only stores the actual samples if the store_audio_samples_check_box check box is selected (otherwise just stores file references).

If a given file path corresponds to a file that does not exist, then an error message is displayed.

パラメータ:
toBeAdded - The files to add to the table.
例外:
java.lang.Exception