|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbr.gui.Menus
public class Menus
This class installs and updates the SurveyBuildR Menus. It is a modification of the menu class developed and written by Wayne Rashaband for ImageJ.
Field Summary | |
---|---|
static char |
ABOUT_MENU
|
static int |
COMMAND_IN_USE
|
static int |
COMMAND_NOT_FOUND
|
static char |
EDIT_MENU
|
static char |
FILE_MENU
|
static int |
INVALID_SHORTCUT
|
static int |
NORMAL_RETURN
|
static int |
NOT_INSTALLED
|
static char |
PLUGINS_MENU
|
static char |
QUEST_MENU
|
static char |
SELECT_MENU
|
static int |
SHORTCUT_IN_USE
|
static int |
WINDOW_MENU_ITEMS
|
Constructor Summary | |
---|---|
Menus(SFrame fr,
boolean showFileMenu)
Basic menu constructor |
Method Summary | |
---|---|
java.lang.String |
addMenuBar()
Method to create and add the menu bar to the frame passed in the constructor. |
static boolean |
commandInUse(java.lang.String command)
|
static int |
convertShortcutToCode(java.lang.String shortcut)
|
static java.util.Hashtable |
getCommands()
Returns the hashtable that associates commands with plugins. |
static java.awt.MenuBar |
getMenuBar()
|
static java.lang.String[] |
getPlugins()
Returns a list of the plugins in the plugins menu. |
static java.lang.String |
getPlugInsPath()
Returns the path to the user plugins directory or null if the plugins directory was not found. |
static int |
installPlugin(java.lang.String plugin,
char menuCode,
java.lang.String command,
java.lang.String shortcut)
Adds a plugin based command to the end of a specified menu. |
void |
setQuestEnabled(boolean b)
Set the enabled state of the Question type Menu |
static int |
uninstallPlugin(java.lang.String command)
Deletes a command installed by installPlugin. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char FILE_MENU
public static final char EDIT_MENU
public static final char SELECT_MENU
public static final char QUEST_MENU
public static final char PLUGINS_MENU
public static final char ABOUT_MENU
public static final int WINDOW_MENU_ITEMS
public static final int NORMAL_RETURN
public static final int COMMAND_IN_USE
public static final int INVALID_SHORTCUT
public static final int SHORTCUT_IN_USE
public static final int NOT_INSTALLED
public static final int COMMAND_NOT_FOUND
Constructor Detail |
---|
public Menus(SFrame fr, boolean showFileMenu)
fr
- the frame to hold the menus. This frame must
implement an action listener.showFileMenu
- boolean flag if the file menu
is to be show. It should not be shown on appletsMethod Detail |
---|
public java.lang.String addMenuBar()
public static java.lang.String[] getPlugins()
public static java.awt.MenuBar getMenuBar()
public void setQuestEnabled(boolean b)
b
- flag = true to enable, false to disenablepublic static java.lang.String getPlugInsPath()
public static java.util.Hashtable getCommands()
public static int installPlugin(java.lang.String plugin, char menuCode, java.lang.String command, java.lang.String shortcut)
plugin
- the plugin (e.g. "Inverter_", "Inverter_("arg")")menuCode
- PLUGINS_MENU, IMPORT_MENU, SAVE_AS_MENU or HOT_KEYScommand
- the menu item label (set to "" to uninstall)shortcut
- the keyboard shortcut (e.g. "y", "Y", "F1")ij
- ImageJ (the action listener)
public static int uninstallPlugin(java.lang.String command)
public static boolean commandInUse(java.lang.String command)
public static int convertShortcutToCode(java.lang.String shortcut)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |