public abstract class JavaTestMenuManager
extends java.lang.Object
getMenuItems()
to return the correct set of items for the given
category. This method may be the most simple for straight forward insertions.
The second method is to use addMenuItem()
to sequentially
specify which menu items should appear. The default implementation of
getMenuItems()
will use data provided by using this second
method.
By default, no menu category will have any custom menus (getMenuItems()
will always return null).
The JMenuItem
objects may be "pull-right" menus if desired. It is
the responsibility of the architect to manage keystroke mneumonics.Modifier and Type | Field and Description |
---|---|
static int |
CONFIG_OTHER |
static int |
CONFIG_PRIMARY |
static int |
CONFIG_VIEW |
static int |
FILE_OTHER |
static int |
FILE_PRIMARY |
static int |
HELP_ABOUT |
static int |
HELP_PRIMARY |
static int |
HELP_TESTSUITE |
static int |
LOG_CONFIG |
static int |
LOG_VIEW |
static int |
PREFERENCES |
static int |
PRESENTATION |
static int |
RUN_OTHER |
static int |
RUN_PRIMARY |
static int |
TOOLS_OTHER |
static int |
WINDOWS_MAIN |
Constructor and Description |
---|
JavaTestMenuManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
addMenuItem(int position,
javax.swing.JMenuItem item)
Add a menu item to the given menu position.
|
javax.swing.JMenuItem[] |
getMenuItems(int position)
Get the menu items to go into the specified position in the menu system.
|
public static final int FILE_PRIMARY
public static final int FILE_OTHER
public static final int CONFIG_PRIMARY
public static final int CONFIG_VIEW
public static final int CONFIG_OTHER
public static final int RUN_PRIMARY
public static final int RUN_OTHER
public static final int WINDOWS_MAIN
public static final int PRESENTATION
public static final int PREFERENCES
public static final int LOG_VIEW
public static final int LOG_CONFIG
public static final int HELP_PRIMARY
public static final int HELP_TESTSUITE
public static final int HELP_ABOUT
public static final int TOOLS_OTHER
public javax.swing.JMenuItem[] getMenuItems(int position)
position
- The menu position, one of the constants of this class.java.lang.IllegalArgumentException
- If the position parameter is out of
range. This is usually the fault of the harness itself, but
may occur if classes are compiled against one development version
of the harness and run with another.protected void addMenuItem(int position, javax.swing.JMenuItem item)
position
- The menu position, one of the constants of this class.item
- The menu item to add.java.lang.IndexOutOfBoundsException
- If the position index is out of
range. Be sure that you are using the constants given in this
class to supply this parameter.Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.