public class MenuHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FLAG_ACTION |
static java.lang.String |
FLAG_ACTION_CLASS |
static java.lang.String |
FLAG_ACTION_CMD |
static java.lang.String |
FLAG_ICON |
Constructor and Description |
---|
MenuHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
addMenuItem(javax.swing.JMenu menu,
javax.swing.JMenuItem jmi) |
static void |
click(javax.swing.JMenuBar menubar,
java.lang.String menuPath) |
static DescriptionVO |
getMenuDescription(Instance guiCtrlMenuInstance) |
static OMSMenuItem |
getMenuItem(java.lang.String name) |
static void |
loadMenu(Instance guiCtrlMenuInstance,
javax.swing.JMenuBar parentMenuBar) |
static void |
loadMenu(Instance guiCtrlMenuInstance,
javax.swing.JPopupMenu parentMenuOrMenuBar) |
static void |
loadMenuItem(Instance guiCtrlMenuItemInstance,
java.awt.Component parentMenuOrMenuBar,
java.awt.event.ActionListener actionListener,
java.awt.event.MouseListener mouseListener) |
static javax.swing.JMenu |
lookForMenu(java.awt.Component parentMenu,
java.lang.String menuName) |
static javax.swing.JMenu |
lookForMenu(java.awt.Component parentMenu,
java.lang.String menuName,
java.lang.String menuLabel) |
static javax.swing.JMenuItem |
lookForMenuItem(javax.swing.JMenu menu,
java.lang.String menuItem) |
static javax.swing.JMenu |
lookOrAddMenu(java.awt.Component parentMenu,
java.lang.String menuName,
java.lang.String menuLabel) |
static javax.swing.JMenu |
lookOrAddMenu(java.awt.Component parentMenu,
java.lang.String menuName,
java.lang.String menuLabel,
boolean bCreateIfNotFound) |
static void |
menuClick(java.awt.event.MouseEvent e) |
public static final java.lang.String FLAG_ACTION
public static final java.lang.String FLAG_ACTION_CLASS
public static final java.lang.String FLAG_ACTION_CMD
public static final java.lang.String FLAG_ICON
public static DescriptionVO getMenuDescription(Instance guiCtrlMenuInstance)
public static void loadMenu(Instance guiCtrlMenuInstance, javax.swing.JMenuBar parentMenuBar)
public static void loadMenu(Instance guiCtrlMenuInstance, javax.swing.JPopupMenu parentMenuOrMenuBar)
public static javax.swing.JMenuItem lookForMenuItem(javax.swing.JMenu menu, java.lang.String menuItem)
public static javax.swing.JMenu lookForMenu(java.awt.Component parentMenu, java.lang.String menuName) throws GuiException
GuiException
public static javax.swing.JMenu lookForMenu(java.awt.Component parentMenu, java.lang.String menuName, java.lang.String menuLabel) throws GuiException
GuiException
public static javax.swing.JMenu lookOrAddMenu(java.awt.Component parentMenu, java.lang.String menuName, java.lang.String menuLabel) throws GuiException
GuiException
public static javax.swing.JMenu lookOrAddMenu(java.awt.Component parentMenu, java.lang.String menuName, java.lang.String menuLabel, boolean bCreateIfNotFound) throws GuiException
parentMenu
- is a JMenu or JMenuBar where we will look for menuNamemenuName
- is the name of the menu, it can be a path like menu1/menu2/menu3menuLabel
- the label displayed for the menu.bCreateIfNotFound
- if false, the function will return null if the menu is not found, otherwise, it will create and return a new menu.GuiException
public static void menuClick(java.awt.event.MouseEvent e)
public static void loadMenuItem(Instance guiCtrlMenuItemInstance, java.awt.Component parentMenuOrMenuBar, java.awt.event.ActionListener actionListener, java.awt.event.MouseListener mouseListener) throws GuiException
GuiException
public static void click(javax.swing.JMenuBar menubar, java.lang.String menuPath) throws GuiException
GuiException
public static void addMenuItem(javax.swing.JMenu menu, javax.swing.JMenuItem jmi)
public static OMSMenuItem getMenuItem(java.lang.String name)