charvax.swing

Class JMenuBar


public class JMenuBar
extends Container

An implementation of a menubar.

Field Summary

Fields inherited from class charva.awt.Container

_components, _currentFocus, _insets, _isValid, _layoutMgr, _minimumSize, _size

Fields inherited from class charva.awt.Component

BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT, _alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible

Constructor Summary

JMenuBar()
Create a new menu bar

Method Summary

JMenu
add(JMenu menu_)
Appends the specified menu to the end of the JMenuBar.
void
debug(int level_)
Output a text description of the menubar.
void
draw()
Draw this menubar.
int
getHeight()
JMenu
getMenu(String text_)
Returns the menu that has the specified text label.
JMenu
getMenu(int index_)
Returns the menu at the specified index.
int
getMenuCount()
Returns the number of menus in the menubar.
Dimension
getSize()
int
getWidth()
Dimension
minimumSize()
void
processKeyEvent(KeyEvent ke_)
Processes key events occurring on this object by dispatching them to any registered KeyListener objects.
String
toString()

Methods inherited from class charva.awt.Container

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

Methods inherited from class charva.awt.Component

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, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor

Constructor Details

JMenuBar

public JMenuBar()
Create a new menu bar

Method Details

add

public JMenu add(JMenu menu_)
Appends the specified menu to the end of the JMenuBar.
Parameters:
menu_ - the menu to be added.
Returns:
the menu that was added.

debug

public void debug(int level_)
Output a text description of the menubar.
Overrides:
debug in interface Container

draw

public void draw()
Draw this menubar.
Overrides:
draw in interface Container

getHeight

public int getHeight()
Overrides:
getHeight in interface Container

getMenu

public JMenu getMenu(String text_)
Returns the menu that has the specified text label.

getMenu

public JMenu getMenu(int index_)
Returns the menu at the specified index.

getMenuCount

public int getMenuCount()
Returns the number of menus in the menubar.

getSize

public Dimension getSize()
Overrides:
getSize in interface Container

getWidth

public int getWidth()
Overrides:
getWidth in interface Container

minimumSize

public Dimension minimumSize()
Overrides:
minimumSize in interface Container

processKeyEvent

public void processKeyEvent(KeyEvent ke_)
Processes key events occurring on this object by dispatching them to any registered KeyListener objects.
Overrides:
processKeyEvent in interface Container

toString

public String toString()