Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## charvax.swing
Class JMenuItem

    java.lang.Object
      charva.awt.Component
          charvax.swing.JComponent
              charvax.swing.AbstractButton
                  charvax.swing.JMenuItem

All Implemented Interfaces:
  EventListener, ItemSelectable, KeyListener

Direct Known Subclasses:
  JMenu

public class JMenuItem
extends AbstractButton

An implementation of an item in a menu.

Field Summary
`protected Dimension` | `_size`

Fields inherited from class charvax.swing.AbstractButton
`_actionListeners, _itemListeners`

Fields inherited from class charvax.swing.JComponent
`_border`

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
`JMenuItem()` Create a menu item without text.
`JMenuItem(java.lang.String text_)` Create a menu item with the specified text.
`JMenuItem(java.lang.String text_, int mnemonic_)` Create a menu item with the specified text and the specified mnemonic.

Method Summary
`void` | `debug(int level_)` Outputs a textual description of this component to stderr.
`void` | `draw()` Draws the border of the component (if there is one).
`int` | `getHeight()`
`Dimension` | `getSize()`
`int` | `getWidth()`
`Dimension` | `minimumSize()`
`void` | `requestFocus()` This method should be invoked by all subclasses of Component which override this method; because this method generates the FOCUS_GAINED event when the component gains the keyboard focus.
`java.lang.String` | `toString()`

Methods inherited from class charvax.swing.AbstractButton
`addActionListener, addItemListener, doClick, fireActionPerformed, fireItemStateChanged, getActionCommand, getLabel, getLabelString, getMnemonic, getText, isSelected, keyPressed, keyReleased, keyTyped, processEvent, processMouseEvent, removeItemListener, setActionCommand, setLabel, setMnemonic, setSelected, setText`

Methods inherited from class charvax.swing.JComponent
`getBorder, getInsets, setBorder`

Methods inherited from class charva.awt.Component
`addFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isTotallyObscured, isValid, isVisible, processFocusEvent, processKeyEvent, repaint, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### _size

    protected Dimension _size

Constructor Detail

### JMenuItem

    public JMenuItem()

  Create a menu item without text.

### JMenuItem

    public JMenuItem(java.lang.String text_)

  Create a menu item with the specified text.

### JMenuItem

    public JMenuItem(java.lang.String text_,
                     int mnemonic_)

  Create a menu item with the specified text and the specified mnemonic.

Parameters:
  `text_` - the label to be displayed in this menu item.
  `mnemonic_` - an ASCII character. The first occurrence of this character in the text label will be shown underlined; and pressing this key will invoke the menu item.

Method Detail

### draw

    public void draw()

  Description copied from class: `JComponent`
  Draws the border of the component (if there is one).

  Overrides:
    `draw` in class `JComponent`

### minimumSize

    public Dimension minimumSize()

  Specified by:
    `minimumSize` in class `Component`

### getSize

    public Dimension getSize()

  Specified by:
    `getSize` in class `Component`

### getWidth

    public int getWidth()

  Specified by:
    `getWidth` in class `Component`

### getHeight

    public int getHeight()

  Specified by:
    `getHeight` in class `Component`

### requestFocus

    public void requestFocus()

  Description copied from class: `Component`
  This method should be invoked by all subclasses of Component which override this method; because this method generates the FOCUS_GAINED event when the component gains the keyboard focus.

  Overrides:
    `requestFocus` in class `Component`

### debug

    public void debug(int level_)

  Outputs a textual description of this component to stderr.

  Specified by:
    `debug` in class `Component`

### toString

    public java.lang.String toString()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD