charvax.swing
Class JPopupMenu
- Runnable
An implementation of a popup menu - a small window that pops up and
displays a number of choices.
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT , _alignmentX , _alignmentY , _background , _cursesColor , _enabled , _focusListeners , _foreground , _keyListeners , _origin , _parent , _visible |
JPopupMenu(Vector items_) - Constructs a JPopupMenu that contains the specified items.
|
addWindowListener , adjustLocation , debug , draw , getLocationOnScreen , getOwner , hide , isDisplayed , isFocusTraversable , pack , processEvent , processWindowEvent , run , show |
add , add , debug , doLayout , draw , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponents , getCurrentFocus , getHeight , getInsets , getSize , getWidth , invalidate , isFocusTraversable , isValid , minimumSize , nextFocus , previousFocus , processKeyEvent , remove , requestFocus , setBackground , setFocus , setForeground , setHeight , setLayout , setSize , setSize , setWidth , validate |
addFocusListener , addKeyListener , contains , contains , debug , draw , getAlignmentX , getAlignmentY , getAncestorWindow , getBackground , getBounds , getCursesColor , getForeground , getHeight , getLocation , getLocationOnScreen , getName , getParent , getSize , getWidth , hasFocus , hide , invalidate , isDisplayed , isEnabled , isFocusTraversable , isTotallyObscured , isValid , isVisible , minimumSize , processEvent , processFocusEvent , processKeyEvent , processMouseEvent , repaint , requestFocus , requestSync , setBackground , setBounds , setBounds , setBounds , setEnabled , setForeground , setLocation , setLocation , setName , setParent , setVisible , show , validate , validateCursesColor |
_leftWasPressed
protected boolean _leftWasPressed
_rightWasPressed
protected boolean _rightWasPressed
_wasCancelled
protected boolean _wasCancelled
JPopupMenu
public JPopupMenu(Vector items_)
Constructs a JPopupMenu that contains the specified items.
Each element in the Vector must be a JMenuItem or JSeparator.
getComponentIndex
public int getComponentIndex(Component c)
getFirstMenuItem
public JMenuItem getFirstMenuItem()
getInvoker
public Component getInvoker()
Returns the component that invoked this popup menu.
getMenuItem
public JMenuItem getMenuItem(int index_)
Returns the menu item at the specified index. If the item
is a JSeparator, it returns null.
setInvoker
public void setInvoker(Component invoker_)
Sets the "invoker" of this popup menu; must be a JMenuBar
or another JPopupMenu.
toString
public String toString()
wasCancelled
public boolean wasCancelled()