|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.dfc.swing.commands.AbstractCommand
dsto.dfc.swing.commands.AbstractMutableCommand
dsto.dfc.swing.commands.BasicFileSaveCommand
public class BasicFileSaveCommand
Base class for File Save commands.
| Field Summary | |
|---|---|
protected Component |
owner
|
| Fields inherited from class dsto.dfc.swing.commands.AbstractMutableCommand |
|---|
listeners |
| Fields inherited from class dsto.dfc.swing.commands.AbstractCommand |
|---|
displayName, icon |
| Fields inherited from interface dsto.dfc.swing.icons.Iconic |
|---|
NULL_ICON |
| Constructor Summary | |
|---|---|
BasicFileSaveCommand()
|
|
BasicFileSaveCommand(Component owner)
|
|
| Method Summary | |
|---|---|
protected void |
dialogCancelled(JFileChooser chooser)
Superclasses may override this to handle the case where the user cancels the dialog. |
void |
execute()
Provides a basic implementation: pops up a file chooser and calls either saveFile () or dialogCancelled (). |
KeyStroke |
getAccelerator()
Get a keyboard accelerator for the command. |
String |
getDescription()
A short description of the command, suitable for a tooltip or use in a status panel. |
String |
getGroupInView(String viewName)
Get the preferred group that this command should appear in for a given view. |
char |
getMnemonic()
Get a character shortcut for the command (eg for use on a menu). |
String |
getName()
The formal identifying name for this command (eg edit.Copy, file.Open). |
protected void |
handleError()
|
protected void |
handleError(Throwable exception)
|
protected void |
initFileChooser(JFileChooser chooser)
Superclasses may override this to setup the file chooser before display. |
boolean |
isInteractive()
True if this command will interact with the user when execute() is called. |
protected void |
saveFile(JFileChooser chooser)
Superclasses may override this to save to a file selected via the chooser. |
| Methods inherited from class dsto.dfc.swing.commands.AbstractMutableCommand |
|---|
addPropertyChangeListener, clone, isEnabled, removePropertyChangeListener, setEnabled, setIcon |
| Methods inherited from class dsto.dfc.swing.commands.AbstractCommand |
|---|
actionPerformed, canReplace, getDefaultDisplayName, getDisplayName, getIcon, getLargeIcon, getLogString, setDisplayName |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Component owner
| Constructor Detail |
|---|
public BasicFileSaveCommand()
public BasicFileSaveCommand(Component owner)
| Method Detail |
|---|
public void execute()
execute in interface Commandexecute in class AbstractCommandinitFileChooser(javax.swing.JFileChooser),
saveFile(javax.swing.JFileChooser),
dialogCancelled(javax.swing.JFileChooser)protected void initFileChooser(JFileChooser chooser)
protected void saveFile(JFileChooser chooser)
protected void dialogCancelled(JFileChooser chooser)
protected void handleError()
protected void handleError(Throwable exception)
public String getName()
Command
getName in interface CommandgetName in interface IconicgetName in class AbstractCommandpublic String getDescription()
Command
getDescription in interface CommandgetDescription in class AbstractCommandpublic boolean isInteractive()
Command
isInteractive in interface CommandisInteractive in class AbstractCommandpublic String getGroupInView(String viewName)
CommandIf the command changes its group in any view it should generate a groupInView property change event with the old value set to the old group and the new value set to the new group.
getGroupInView in interface CommandgetGroupInView in class AbstractCommandviewName - The name of the view.
public char getMnemonic()
Command
getMnemonic in interface CommandgetMnemonic in class AbstractCommandpublic KeyStroke getAccelerator()
Command
getAccelerator in interface CommandgetAccelerator in class AbstractCommand
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||