puzzled.actions
Class ActionManager

java.lang.Object
  |
  +--puzzled.actions.ActionManager

public class ActionManager
extends java.lang.Object

Class responsible for initializing the action required by the application in order to build the menu bar, the toolbar, and the popub menu. It also has a few method for enabling or disabling some widgets depending on the state of the application.

Version:
1.54 24 March 99
Author:
Frédéric Demers

Constructor Summary
ActionManager(ProblemSolver parent_arg)
          Constructor receiving the application reference as a parameter.
 
Method Summary
protected  void createEditMenu()
          Method defining the Edit Menu, its keyboard accelerators, and shortcuts.
protected  void createFileMenu()
          Method defining the File Menu, its keyboard accelerators, and shortcuts.
protected  void createHelpMenu()
          Method defining the Help Menu, its keyboard accelerators, and shortcuts.
protected  void createToolbar()
          Creates the toolbar by adding the actions onto the toolbar.
 void triggerNew(java.io.File theFile)
           
 void triggerOpen(java.io.File aFile)
           
 void triggerSave()
          This method creates a new event to simulate a Save action.
 void triggerSaveAs()
          This method creates a new event to simulate a SaveAs action.
 void updatePopupLAF(java.lang.String LAF_arg)
          Since the popup is built before the LAF is loaded, an explicit call to update its LAF is necessary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionManager

public ActionManager(ProblemSolver parent_arg)
Constructor receiving the application reference as a parameter. This constructor then saves this reference as a private instance variable so that the other methods can call the application's public methods.
Parameters:
arg_parent - the application reference used for callbacks
Method Detail

createToolbar

protected void createToolbar()
Creates the toolbar by adding the actions onto the toolbar. The icons are grouped and separated by a separator.

createFileMenu

protected void createFileMenu()
Method defining the File Menu, its keyboard accelerators, and shortcuts.

createEditMenu

protected void createEditMenu()
Method defining the Edit Menu, its keyboard accelerators, and shortcuts.

createHelpMenu

protected void createHelpMenu()
Method defining the Help Menu, its keyboard accelerators, and shortcuts.

updatePopupLAF

public void updatePopupLAF(java.lang.String LAF_arg)
Since the popup is built before the LAF is loaded, an explicit call to update its LAF is necessary

triggerSaveAs

public void triggerSaveAs()
This method creates a new event to simulate a SaveAs action. It is used when the user request to save the worksheet that has been modified but has not provided a name other than the noNameString defined in Powerflow.

triggerSave

public void triggerSave()
This method creates a new event to simulate a Save action. It is used when the user request to save the worksheet that has been modified.

triggerOpen

public void triggerOpen(java.io.File aFile)

triggerNew

public void triggerNew(java.io.File theFile)