JClass DesktopViews 6.3.0 API
Documentation

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

Nested Class Summary
 
Nested classes inherited from class java.awt.PopupMenu
PopupMenu.AccessibleAWTPopupMenu
 
Nested classes inherited from class java.awt.Menu
Menu.AccessibleAWTMenu
 
Nested classes inherited from class java.awt.MenuItem
MenuItem.AccessibleAWTMenuItem
 
Nested classes inherited from class java.awt.MenuComponent
MenuComponent.AccessibleAWTMenuComponent
 
Constructor Summary
BasePopupMenu(ActionListener listener)
          BasePopupMenu constructor
 
Method Summary
 void addItem(String command, ActionListener listener)
          Adds new item to the menu.
static boolean enableMenuItem(Menu menu, String command, boolean enable)
          Enable or disable a menu item in the popup menu.
 boolean enableMenuItem(String key, boolean enable)
          Enable or disable a menu item in the popup menu.
protected abstract  String[] getCommands()
          Returns component specific command set.
 
Methods inherited from class java.awt.PopupMenu
addNotify, getAccessibleContext, show
 
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
 
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, setFont, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

BasePopupMenu

public BasePopupMenu(ActionListener listener)
BasePopupMenu constructor

Method Detail

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.

Copyright © 2004 Quest Software Inc..
All rights reserved.