gov.virginia.dcjs.gui
Class ApplicationFrame

java.lang.Object
  extended bygov.virginia.dcjs.gui.ApplicationFrame
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

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


Field Summary
protected  ClientFrame frame
          Container for all application screens
protected  ClientMenu menu
          Application menu
 
Constructor Summary
ApplicationFrame(java.lang.String title, java.lang.String logonCaption, java.lang.String pwdCaption)
          Prepare the main application frame with the specified namings.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  void authenticate(java.lang.String username, java.lang.String password)
           
protected  void prepareMenu()
          Subclasses access the protected menu field, creating * the menu options and items, while providing the appropriate * listeners and keyboard shortcuts.
protected  void prepareScreens()
          All screens to be used by the application are prepared here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frame

protected ClientFrame frame
Container for all application screens


menu

protected ClientMenu menu
Application menu

Constructor Detail

ApplicationFrame

public ApplicationFrame(java.lang.String title,
                        java.lang.String logonCaption,
                        java.lang.String pwdCaption)
Prepare the main application frame with the specified namings. * @param title Title of application. * @param logonCaption Caption for the username portion of a logon. * @param pwdCaption Caption for the password portion of a logon.

Method Detail

prepareScreens

protected void prepareScreens()
All screens to be used by the application are prepared here. * For example, the logon screen can be added via:

* frame.addScreen(new ApplicationLogon(this, "User Name", "Password"), "Login").


prepareMenu

protected void prepareMenu()
Subclasses access the protected menu field, creating * the menu options and items, while providing the appropriate * listeners and keyboard shortcuts. For example:

* * menu.addMenuOption("Decide", KeyEvent.VK_D, null);
* menu.addMenuItem("Decide", "Yes", KeyEvent.VK_Y, this);
* menu.addMenuItem("Decide", "Maybe", KeyEvent.VK_M, this);
* menu.addMenuItem("Decide", "No", KeyEvent.VK_N, this);
* menu.addMenuOption("Skill Level", KeyEvent.VK_S, null);
* menu.addMenuItem("Skill Level", "Unix", KeyEvent.VK_U, this);
* menu.addMenuItem("Skill Level", "Windows", KeyEvent.VK_W, this);
* menu.addMenuItem("Skill Level", "Mac", KeyEvent.VK_M, this);
* menu.addMenuSeparator("Skill Level");
* menu.addMenuItem("Skill Level", "Medevil", KeyEvent.VK_E, this);
*
*

* Initially, the menu only has one option/item, System/Logon. Sub * classes may recreate the menu as desired, but in order to maintain * the default settings, these classes need to call * super.prepareScreens() first, whether manipulating the menu * manually, or as the first line when overriding this method.


authenticate

protected void authenticate(java.lang.String username,
                            java.lang.String password)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener