JET

edu.utep.cs.et.gui
Class MenuFactory

java.lang.Object
  extended by edu.utep.cs.et.gui.MenuFactory
All Implemented Interfaces:
Constants

public class MenuFactory
extends Object
implements Constants

A class to create various menus such as file menu, edit menu, tool menu, option menu, view menu, and help menu. This class also creates popup menus for several GUI components, such as the explorer pane. To create various menu items, this class uses the class ActionFactory.


Nested Class Summary
private static class MenuFactory.AboutViewer
          The dialog window that displays the tool's version number and copyright notice.
private static class MenuFactory.CheckableMenuItem
          A special menu item class that displays an icon (check mark) if the pane corresponding to the menu item is currently visible.
private static class MenuFactory.HelpViewer
          A frame class to display the project website.
private static interface MenuFactory.Hideable
          An interface to the display panes that can be made visible and invisible.
private static class MenuFactory.LinkListener
          A class allowing for the help viewer to load the tool's web page.
 
Field Summary
private  ActionFactory factory
          The action factory to create various menu item actions.
private static OptionDialog optionDialog
          The option dialog used by the option menu.
 
Fields inherited from interface edu.utep.cs.et.gui.Constants
CLASS_EXTENSION, COLOR_EXPLORER, COLOR_OUTPUT, COPYRIGHT, DEBUG, DIVIDER_SIZE, EDIT_MENU_NAME, EXPLORER_DIR, EXPLORER_ROOT, FILE_MENU_NAME, HELP_MENU_NAME, ICON_ABOUT, ICON_ABSTRACT_CLASS, ICON_BROWSER, ICON_CLASS, ICON_CLASS_DISABLED, ICON_DELETE, ICON_ERROR, ICON_FILE, ICON_FOLDER, ICON_GEN_APP, ICON_HOME, ICON_INFORM, ICON_INTERFACE, ICON_JAVA_FILE, ICON_JML_LOGO, ICON_METHOD, ICON_METHOD_GREEN, ICON_METHOD_ORANGE, ICON_METHOD_RED, ICON_MINER, ICON_NEW, ICON_NEWTESTSUITE, ICON_NOTE, ICON_OPEN, ICON_OUTPUT, ICON_PREFERENCES, ICON_QUESTION, ICON_REDO, ICON_SAVE_AS, ICON_TEST_FILE, ICON_UNDO, ICON_UNKOWN, ICON_WARN, JAVA, JAVA_EXTENSION, JAVAC, JUNIT_SWINGGUI_TESTRUNNER, NEWLINE, OPTION_MENU_NAME, TEST_MENU_NAME, TITLE, TOOL_MENU_NAME, VERSION, WEB_PAGE_LOCATION, WEB_PAGE_NAME, WINDOW_HEIGHT, WINDOW_MIN_HEIGHT, WINDOW_MIN_WIDTH, WINDOW_WIDTH
 
Constructor Summary
MenuFactory(ActionFactory factory)
          Creates a new instance that creates various menus by using the given action factory.
 
Method Summary
 JMenu createEditMenu(Editor editor)
          Creates the edit menu.
 JPopupMenu createExplorerPopupMenu()
          Creates the popup menu for the directory browser.
 JMenu createFileMenu()
          Creates the file menu.
 JMenu createHelpMenu()
          Creates the help menu.
 JMenu createOptionMenu(Main tool, OptionPanel editor, OptionPanel tester)
          Creates the option menu.
 JMenu createToolMenu()
          Creates the tool menu.
 JMenu createViewMenu(ViewController vc)
          Creates the view menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

private ActionFactory factory
The action factory to create various menu item actions.


optionDialog

private static OptionDialog optionDialog
The option dialog used by the option menu.

Constructor Detail

MenuFactory

public MenuFactory(ActionFactory factory)
Creates a new instance that creates various menus by using the given action factory.

Method Detail

createFileMenu

public JMenu createFileMenu()
Creates the file menu.


createEditMenu

public JMenu createEditMenu(Editor editor)
Creates the edit menu.


createToolMenu

public JMenu createToolMenu()
Creates the tool menu.


createViewMenu

public JMenu createViewMenu(ViewController vc)
Creates the view menu.


createOptionMenu

public JMenu createOptionMenu(Main tool,
                              OptionPanel editor,
                              OptionPanel tester)
Creates the option menu.


createHelpMenu

public JMenu createHelpMenu()
Creates the help menu.


createExplorerPopupMenu

public JPopupMenu createExplorerPopupMenu()
Creates the popup menu for the directory browser.


JET

JET is Copyright (C) 2005-2007 by The University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.