org.norvelle.textcite.gui.action
Class SaveCitebookAction

java.lang.Object
  extended by org.norvelle.textcite.gui.action.SaveCitebookAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class SaveCitebookAction
extends java.lang.Object
implements java.awt.event.ActionListener

SaveCitebookAction: An Action class that can be assigned directly to a JMenuItem or ToolbarButton, that saves the current CiteBook. Can be instantiated either to perform a Save As, or to perform a simple Save action.

Author:
Erik Norvelle

Field Summary
static int SAVE_ACTION
           
static int SAVE_AS_ACTION
           
 
Constructor Summary
SaveCitebookAction(int actionType, MainFrame frame)
          Construct the Action, passing the action type as parameter.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent arg0)
          Called by the menu or toolbar when the user chooses the action.
 void performSave()
          File | Save Citebook action performed.
 void performSaveAs()
          File | Save Citebook As action performed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAVE_ACTION

public static final int SAVE_ACTION
See Also:
Constant Field Values

SAVE_AS_ACTION

public static final int SAVE_AS_ACTION
See Also:
Constant Field Values
Constructor Detail

SaveCitebookAction

public SaveCitebookAction(int actionType,
                          MainFrame frame)
Construct the Action, passing the action type as parameter.

Parameters:
actionType - The type of action, either SAVE_ACTION or SAVE_AS_ACTION
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent arg0)
Called by the menu or toolbar when the user chooses the action. Depending on the ActionType chosen when creating this Action, performs a Save As or simple Save.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

performSaveAs

public void performSaveAs()
File | Save Citebook As action performed.

Parameters:
actionEvent - ActionEvent

performSave

public void performSave()
File | Save Citebook action performed.

Parameters:
actionEvent - ActionEvent