org.argouml.uml.ui
Class ActionSaveProject

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.ActionFileOperations
          extended byorg.argouml.uml.ui.ActionSaveProject
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
ActionSaveProjectAs

public class ActionSaveProject
extends ActionFileOperations

Action that saves the project.

See Also:
ActionOpenProject, Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
private static ActionSaveProject INSTANCE
          The singleton.
private static Logger LOG
          logger
 
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
protected ActionSaveProject()
          The constructor.
protected ActionSaveProject(String name, Icon icon)
          The constructor.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
static ActionSaveProject getInstance()
           
 boolean trySave(boolean overwrite)
          Try to save the project.
 boolean trySave(boolean overwrite, File file)
          Try to save the project.
 
Methods inherited from class org.argouml.uml.ui.ActionFileOperations
askConfirmationAndSave, loadProject
 
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
 

Field Detail

LOG

private static final Logger LOG
logger


INSTANCE

private static final ActionSaveProject INSTANCE
The singleton.

Constructor Detail

ActionSaveProject

protected ActionSaveProject()
The constructor.


ActionSaveProject

protected ActionSaveProject(String name,
                            Icon icon)
The constructor.

Parameters:
name - the name of the action.
icon - the icon to represent this action graphically.
Method Detail

getInstance

public static ActionSaveProject getInstance()
Returns:
the singleton

actionPerformed

public void actionPerformed(ActionEvent e)
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

trySave

public boolean trySave(boolean overwrite)
Try to save the project.

Parameters:
overwrite - if true, then we overwrite without asking
Returns:
true if successful

trySave

public boolean trySave(boolean overwrite,
                       File file)
Try to save the project.

Parameters:
overwrite - if true, then we overwrite without asking
file - the File to save to
Returns:
true if successful


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook