|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractAction | +--org.argouml.uml.ui.UMLAction | +--org.argouml.uml.ui.ActionSaveGraphics
Wraps a CmdSaveGIF or CmdSave(E)PS to allow selection of an output file.
Field Summary | |
---|---|
protected static Logger |
cat
Deprecated. as of 0.15.4. Will be made private. Use your own logger. |
static java.lang.String |
separator
Deprecated. by Linus Tolke as of 0.15.4. Get this information from some java.io class. |
static ActionSaveGraphics |
SINGLETON
Deprecated. by Linus Tolke as of 0.15.4 this should not be used. We are changing this action so that it will no longer be a singleton. Use the constructor to create yourself a new instance of this object instead. |
Fields inherited from class org.argouml.uml.ui.UMLAction |
---|
HAS_ICON, NO_ICON |
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 | |
---|---|
ActionSaveGraphics()
Constructor for this action. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
Perform the work the action is supposed to do. |
boolean |
doCommand(java.lang.String argument)
Execute this action from the command line. |
private boolean |
doSave(java.io.File theFile,
java.lang.String suffix,
boolean overwrite)
Actually do the saving. |
boolean |
trySave(boolean overwrite)
Method that does almost everything in this class. |
Methods inherited from class org.argouml.uml.ui.UMLAction |
---|
getMnemonic, getShortcut, getValue, isEnabled, markNeedsSave, putValue, shouldBeEnabled, stripJunk, updateEnabled, updateEnabled |
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Logger cat
public static ActionSaveGraphics SINGLETON
public static final java.lang.String separator
java.io
,
Constant Field ValuesConstructor Detail |
public ActionSaveGraphics()
Method Detail |
public void actionPerformed(java.awt.event.ActionEvent ae)
UMLAction
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class UMLAction
UMLAction.actionPerformed(ActionEvent)
public boolean trySave(boolean overwrite)
overwrite
- True if we shouldn't care that we erase an old copy.
private boolean doSave(java.io.File theFile, java.lang.String suffix, boolean overwrite) throws java.io.FileNotFoundException, java.io.IOException
theFile
- is the file that we are writing tosuffix
- is the suffix. Used for deciding what format the file
shall have.overwrite
- is true if we are not supposed to warn that we are
replacing an old file.
java.io.FileNotFoundException
java.io.IOException
public boolean doCommand(java.lang.String argument)
doCommand
in interface CommandLineInterface
argument
- is the file name that we save to.
CommandLineInterface.doCommand(String)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |