charvax.swing
Class JPopupMenu
java.lang.Object
charva.awt.Component
charva.awt.Container
charva.awt.Window
charva.awt.Frame
charvax.swing.JFrame
charvax.swing.JPopupMenu
- All Implemented Interfaces:
- java.lang.Runnable
- public class JPopupMenu
- extends JFrame
An implementation of a popup menu - a small window that pops up and
displays a number of choices.
Fields inherited from class charva.awt.Component |
_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary |
JPopupMenu(java.util.Vector items_)
Constructs a JPopupMenu that contains the specified items. |
Methods inherited from class charva.awt.Window |
addWindowListener, adjustLocation, debug, getLocationOnScreen, getOwner, hide, isDisplayed, isFocusTraversable, pack, processEvent, processWindowEvent, run, show |
Methods inherited from class charva.awt.Container |
add, add, doLayout, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getCurrentFocus, getHeight, getInsets, getSize, getWidth, invalidate, isValid, nextFocus, previousFocus, remove, requestFocus, setFocus, setHeight, setLayout, setSize, setSize, setWidth, validate |
Methods inherited from class charva.awt.Component |
addFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getName, getParent, hasFocus, isEnabled, isTotallyObscured, isVisible, processFocusEvent, processMouseEvent, repaint, requestSync, setBounds, setBounds, setBounds, setEnabled, setLocation, setLocation, setName, setParent, setVisible, validateCursesColor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_wasCancelled
protected boolean _wasCancelled
_leftWasPressed
protected boolean _leftWasPressed
_rightWasPressed
protected boolean _rightWasPressed
JPopupMenu
public JPopupMenu(java.util.Vector items_)
- Constructs a JPopupMenu that contains the specified items.
Each element in the Vector must be a JMenuItem or JSeparator.
setInvoker
public void setInvoker(Component invoker_)
- Sets the "invoker" of this popup menu; must be a JMenuBar
or another JPopupMenu.
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.
getComponentIndex
public int getComponentIndex(Component c)
processKeyEvent
public void processKeyEvent(KeyEvent e)
- Description copied from class:
Component
- Invoke all the KeyListener callbacks that may have been registered
for this component. The KeyListener objects may modify the
keycodes, and can also set the "consumed" flag.
- Overrides:
processKeyEvent
in class Container
wasCancelled
public boolean wasCancelled()
toString
public java.lang.String toString()