com.klg.jclass.table.beans
Class BasePopupMenu
java.lang.Object
|
+--java.awt.MenuComponent
|
+--java.awt.MenuItem
|
+--java.awt.Menu
|
+--java.awt.PopupMenu
|
+--com.klg.jclass.table.beans.BasePopupMenu
- All Implemented Interfaces:
- Accessible, MenuContainer, Serializable
- public abstract class BasePopupMenu
- extends PopupMenu
BasePopupMenu is the popup menu to initiate component specific
commands at runtime.
- See Also:
- Serialized Form
Methods inherited from class java.awt.Menu |
add, add, addSeparator, countItems, getItem, getItemCount, insert, insert, insertSeparator, isTearOff, paramString, remove, remove, removeAll, removeNotify |
Methods inherited from class java.awt.MenuItem |
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getActionListeners, getLabel, getListeners, getShortcut, isEnabled, processActionEvent, processEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut |
BasePopupMenu
public BasePopupMenu(ActionListener listener)
- BasePopupMenu constructor
getCommands
protected abstract String[] getCommands()
- Returns component specific command set.
addItem
public void addItem(String command,
ActionListener listener)
- Adds new item to the menu.
- Parameters:
command
- menu item command string.listener
- action listener for the menu items.
enableMenuItem
public boolean enableMenuItem(String key,
boolean enable)
- Enable or disable a menu item in the popup menu.
- Parameters:
enable
- True if enable else false.
- Returns:
- True if menu item is found and is enabled or is disabled.
enableMenuItem
public static boolean enableMenuItem(Menu menu,
String command,
boolean enable)
- Enable or disable a menu item in the popup menu.
- Parameters:
menu
- The menu level.command
- The command string.enable
- True if enable else false.
- Returns:
- True if menu item is found and is enabled or is disabled.