|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcharva.awt.Component
charvax.swing.JComponent
charvax.swing.AbstractButton
charvax.swing.JMenuItem
charvax.swing.JMenu
Implements a menu containing JMenuItems and JSeparators.
| Field Summary |
| Fields inherited from class charvax.swing.JMenuItem |
_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 | |
JMenu()
Constructs a new JMenu with no text (the text can be set later with the setText() method of the superclass). |
|
JMenu(java.lang.String text_)
Constructs a new JMenu with the specified string as its text |
|
JMenu(java.lang.String text_,
int mnemonic_)
Constructs a new JMenu with the specified text and the specified mnemonic character (which must appear in the text). |
|
| Method Summary | |
JMenuItem |
add(JMenuItem item_)
Add a JMenuItem (or JMenu) to the end of this JMenu. |
JMenuItem |
add(java.lang.String text_)
Create a JMenuItem with the specified label and add it to the menu. |
void |
addSeparator()
Add a horizontal separator to the end of the menu. |
void |
debug(int level_)
Output a text description of the menu. |
void |
draw()
Draws the border of the component (if there is one). |
void |
fireActionPerformed(ActionEvent ae_)
Invoke all the ActionListener callbacks that may have been registered for this button. |
int |
getHeight()
|
JMenuItem |
getMenuItem(int index_)
Returns the menu item at the specified index. |
JPopupMenu |
getPopupMenu()
Returns a reference to this JMenu's popup menu. |
Dimension |
getSize()
|
int |
getWidth()
|
boolean |
isPopupMenuVisible()
Returns true if the popup window of this menu is displayed. |
boolean |
isTopLevelMenu()
Returns true if this menu is the direct child of a menubar. |
Dimension |
minimumSize()
|
void |
setBackground(Color color_)
Sets the background color of this JMenu and all its contained JMenuItems that do not yet have their background color set. |
void |
setForeground(Color color_)
Sets the foreground color of this JMenu and all its contained JMenuItems that do not yet have their foreground color set. |
void |
setPopupMenuVisible(boolean visible_)
Displays this menu's popup menu if the specified value is true; hides the menu if it is false. |
java.lang.String |
toString()
|
| Methods inherited from class charvax.swing.JMenuItem |
requestFocus |
| Methods inherited from class charvax.swing.AbstractButton |
addActionListener, addItemListener, doClick, 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, setBounds, setBounds, setBounds, setEnabled, 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 |
| Constructor Detail |
public JMenu()
public JMenu(java.lang.String text_)
public JMenu(java.lang.String text_,
int mnemonic_)
| Method Detail |
public JMenuItem add(JMenuItem item_)
public void addSeparator()
public JMenuItem add(java.lang.String text_)
public void setForeground(Color color_)
setForeground in class Componentpublic void setBackground(Color color_)
setBackground in class Componentpublic void draw()
JComponent
draw in class JMenuItempublic JMenuItem getMenuItem(int index_)
public void fireActionPerformed(ActionEvent ae_)
AbstractButton
fireActionPerformed in class AbstractButtonpublic Dimension minimumSize()
minimumSize in class JMenuItempublic Dimension getSize()
getSize in class JMenuItempublic int getWidth()
getWidth in class JMenuItempublic int getHeight()
getHeight in class JMenuItempublic boolean isPopupMenuVisible()
public void setPopupMenuVisible(boolean visible_)
public boolean isTopLevelMenu()
public JPopupMenu getPopupMenu()
public void debug(int level_)
debug in class JMenuItempublic java.lang.String toString()
toString in class JMenuItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||