public class JavaFXMenuItems extends GUIMenuItems
To initialise the object/class call init()
currentCommandListener, includeExtraMenus, properties| Constructor and Description |
|---|
JavaFXMenuItems(PropertiesFile properties) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMenuItem(javafx.scene.control.Menu parentMenu,
String text,
int ID) |
protected void |
addToMainMenu(javafx.scene.control.Menu fileMenuList)
add MenuItem to main menu
|
void |
addToMenu(Object menuItem,
int parentMenuID)
Add a menu item to a given menu bar
|
void |
createMainMenu(boolean includeAll,
CommandListener currentCommandListener,
boolean isSingle,
Values commonValues,
Commands currentCommands,
GUIButtons buttons)
Not part of API - used internally
|
void |
disableUnimplementedItems(int ID,
boolean disableViewModes)
Temporary Method to Disable unimplemented Viewer Items.
|
void |
dispose()
Method to dispose of objects used by the menu bar.
|
void |
ensureNoSeperators()
Remove separators from between menu items in File, Edit, View and Goto menuMap
|
void |
ensureNoSeperators(int type)
Not part of API - used internally
|
javafx.scene.control.MenuBar |
getCurrentMenuFX()
Get the MenuBar that holds the menu items
|
protected void |
initLayoutMenus(javafx.scene.control.Menu pageLayout,
String[] descriptions,
int[] value,
GUIButtons buttons,
Commands currentCommands)
sets up layout menu (controls page views - Multiple, facing,etc)
|
boolean |
isMenuItemExist(int ID)
Check if the given menu item has been created for the viewer
|
void |
setBackNavigationItemsEnabled(boolean enabled)
Method to enable or disable the back navigation menu items
|
void |
setCheckMenuItemSelected(int ID,
boolean b)
Set the selected state of a check box style menu item.
|
void |
setForwardNavigationItemsEnabled(boolean enabled)
Method to enable or disable the forward navigation menu items
|
void |
setGoToNavigationItemEnabled(boolean enabled)
Method to enable or disable the goto menu items
|
void |
setMenuItem(int ID,
boolean enabled,
boolean visible)
Set the visibility or the enabled state of the menu or menu item specified by the id
|
void |
setMenusForDisplayMode(int commandIDForDislayMode,
int mouseMode)
Sets various menu items as enabled or disabled
and selects given values based on the display view.
|
public JavaFXMenuItems(PropertiesFile properties)
public javafx.scene.control.MenuBar getCurrentMenuFX()
public void dispose()
dispose in class GUIMenuItemspublic void setCheckMenuItemSelected(int ID,
boolean b)
setCheckMenuItemSelected in class GUIMenuItemsID - int value for the menu items you wish to selectb - true to select the menu item, false to deselectpublic void setBackNavigationItemsEnabled(boolean enabled)
setBackNavigationItemsEnabled in class GUIMenuItemsenabled - true to enable, false to disablepublic void setForwardNavigationItemsEnabled(boolean enabled)
setForwardNavigationItemsEnabled in class GUIMenuItemsenabled - true to enable, false to disablepublic void setGoToNavigationItemEnabled(boolean enabled)
setGoToNavigationItemEnabled in class GUIMenuItemsenabled - true to enable, false to disableprotected void addMenuItem(javafx.scene.control.Menu parentMenu,
String text,
int ID)
protected void initLayoutMenus(javafx.scene.control.Menu pageLayout,
String[] descriptions,
int[] value,
GUIButtons buttons,
Commands currentCommands)
public void setMenusForDisplayMode(int commandIDForDislayMode,
int mouseMode)
setMenusForDisplayMode in class GUIMenuItemscommandIDForDislayMode - int value for the display view being usedmouseMode - int values for the mouse mode being usedprotected void addToMainMenu(javafx.scene.control.Menu fileMenuList)
public void createMainMenu(boolean includeAll,
CommandListener currentCommandListener,
boolean isSingle,
Values commonValues,
Commands currentCommands,
GUIButtons buttons)
create items for menuMap on the menu bar
createMainMenu in class GUIMenuItemspublic void ensureNoSeperators()
ensureNoSeperators in class GUIMenuItemspublic void ensureNoSeperators(int type)
Ensure no separators are present on the given MenuItem
ensureNoSeperators in class GUIMenuItemstype - int value for the menu bar to checkpublic boolean isMenuItemExist(int ID)
isMenuItemExist in class GUIMenuItemsID - int value specifying a menu itempublic void setMenuItem(int ID,
boolean enabled,
boolean visible)
setMenuItem in class GUIMenuItemsID - int value specifying a menu itemenabled - true to enable the menu item, false to disablevisible - true to show the menu item, false to hide itpublic void addToMenu(Object menuItem, int parentMenuID)
addToMenu in class GUIMenuItemsmenuItem - MenuItem to be add to the menu barparentMenuID - int value for the parent menu to add topublic void disableUnimplementedItems(int ID,
boolean disableViewModes)
Copyright © 2017. All rights reserved.