|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jface.action.Action
com.groovemanager.app.sse.SaveAudioFileAsAction
This class can be used for saving audio files. In addition to what a FileSaveAsAction does, this class will also ensure that a dialog for format selection will be shown to the user.
| Field Summary | |
|---|---|
private boolean |
allowOverwrite
Allow the user to select already existing files |
private AudioManager |
audioManager
The AudioManager to be used by this action |
private javax.sound.sampled.AudioFormat |
format
The audio format to write |
private ChooseFormatDialog |
formatDialog
The dialog to use for selection of the audio format |
private java.util.ArrayList |
listeners
List of Listeners registered with this action |
private org.eclipse.swt.widgets.Shell |
shell
The parent shell to be used for the dialog |
private java.io.File |
source
The source file that should be saved. |
| Fields inherited from interface org.eclipse.jface.action.IAction |
|---|
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, IMAGE, TEXT, TOOL_TIP_TEXT |
| Constructor Summary | |
|---|---|
SaveAudioFileAsAction(java.lang.String s,
boolean allowOverwrite)
Create a new SaveAudioFileAsAction |
|
| Method Summary | |
|---|---|
void |
addAudioFileSaveListener(AudioFileSaveListener listener)
Add an AudioFileSaveListener to this action |
protected org.eclipse.swt.widgets.Shell |
getShell()
Get the currently assigned parent shell |
java.io.File |
getSource()
Get the source file currently assigned to this action |
void |
removeAudioFileSaveListener(AudioFileSaveListener listener)
Remove an AudioFileSaveListener from this action |
void |
run()
Perform this action. |
void |
setAudioManager(AudioManager manager)
Set the AudioManager to be used by this action |
void |
setFormat(javax.sound.sampled.AudioFormat format)
Set the default format to be used for saving |
void |
setFormatDialog(ChooseFormatDialog dialog)
Set the ChooseFormatDialog to be shown to the user |
void |
setShell(org.eclipse.swt.widgets.Shell shell)
Set the shell to be used as parent shell for the dialogs |
void |
setSourceFile(java.io.File f)
Set the source file that should be saved. |
| Methods inherited from class org.eclipse.jface.action.Action |
|---|
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, removeAcceleratorText, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean allowOverwrite
private AudioManager audioManager
private javax.sound.sampled.AudioFormat format
private ChooseFormatDialog formatDialog
private java.util.ArrayList listeners
private org.eclipse.swt.widgets.Shell shell
private java.io.File source
| Constructor Detail |
|---|
public SaveAudioFileAsAction(java.lang.String s,
boolean allowOverwrite)
s - The name of the actionallowOverwrite - true, if the user should be able to overwrite
existing files, false otherwise| Method Detail |
|---|
public void addAudioFileSaveListener(AudioFileSaveListener listener)
listener - The AudioFileSaveListener to be addedprotected org.eclipse.swt.widgets.Shell getShell()
public java.io.File getSource()
public void removeAudioFileSaveListener(AudioFileSaveListener listener)
listener - The AudioFileSaveListener to be removedpublic void run()
run in interface org.eclipse.jface.action.IActionrun in class org.eclipse.jface.action.ActionIAction.run()public void setAudioManager(AudioManager manager)
manager - The AudioManager to be usedpublic void setFormat(javax.sound.sampled.AudioFormat format)
format - The AudioFormat, the format dialog will show first when
openedpublic void setFormatDialog(ChooseFormatDialog dialog)
dialog - The dialog that will be shown to the user for format
selectionpublic void setShell(org.eclipse.swt.widgets.Shell shell)
shell - The parent shell for the dialogspublic void setSourceFile(java.io.File f)
null, the action will be disabled. Otherwise it will be
enabled.
f - The file to save or null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||