com.irisel.oms.guiom.internal.tools
Class MenuHelper
java.lang.Object
com.irisel.oms.guiom.internal.tools.MenuHelper
public class MenuHelper
- extends java.lang.Object
Method Summary |
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)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FLAG_ACTION
public static final java.lang.String FLAG_ACTION
- See Also:
- Constant Field Values
FLAG_ACTION_CLASS
public static final java.lang.String FLAG_ACTION_CLASS
- See Also:
- Constant Field Values
FLAG_ACTION_CMD
public static final java.lang.String FLAG_ACTION_CMD
- See Also:
- Constant Field Values
FLAG_ICON
public static final java.lang.String FLAG_ICON
- See Also:
- Constant Field Values
MenuHelper
public MenuHelper()
getMenuDescription
public static DescriptionVO getMenuDescription(Instance guiCtrlMenuInstance)
loadMenu
public static void loadMenu(Instance guiCtrlMenuInstance,
javax.swing.JMenuBar parentMenuBar)
loadMenu
public static void loadMenu(Instance guiCtrlMenuInstance,
javax.swing.JPopupMenu parentMenuOrMenuBar)
lookForMenuItem
public static javax.swing.JMenuItem lookForMenuItem(javax.swing.JMenu menu,
java.lang.String menuItem)
lookForMenu
public static javax.swing.JMenu lookForMenu(java.awt.Component parentMenu,
java.lang.String menuName)
throws GuiException
- Throws:
GuiException
lookForMenu
public static javax.swing.JMenu lookForMenu(java.awt.Component parentMenu,
java.lang.String menuName,
java.lang.String menuLabel)
throws GuiException
- Throws:
GuiException
lookOrAddMenu
public static javax.swing.JMenu lookOrAddMenu(java.awt.Component parentMenu,
java.lang.String menuName,
java.lang.String menuLabel)
throws GuiException
- Throws:
GuiException
lookOrAddMenu
public static javax.swing.JMenu lookOrAddMenu(java.awt.Component parentMenu,
java.lang.String menuName,
java.lang.String menuLabel,
boolean bCreateIfNotFound)
throws GuiException
- Parameters:
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.
- Returns:
- if bCreateIfNotFound is false, the function will return null if the menu is not found, otherwise, it will create and return a new menu.
- Throws:
GuiException
menuClick
public static void menuClick(java.awt.event.MouseEvent e)
loadMenuItem
public static void loadMenuItem(Instance guiCtrlMenuItemInstance,
java.awt.Component parentMenuOrMenuBar,
java.awt.event.ActionListener actionListener,
java.awt.event.MouseListener mouseListener)
throws GuiException
- Throws:
GuiException
click
public static void click(javax.swing.JMenuBar menubar,
java.lang.String menuPath)
throws GuiException
- Throws:
GuiException
addMenuItem
public static void addMenuItem(javax.swing.JMenu menu,
javax.swing.JMenuItem jmi)
getMenuItem
public static OMSMenuItem getMenuItem(java.lang.String name)