charvax.swing
Class JMenuBar

java.lang.Object
  extended bycharva.awt.Component
      extended bycharva.awt.Container
          extended bycharvax.swing.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
_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
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(int index_)
          Returns the menu at the specified index.
 JMenu getMenu(java.lang.String text_)
          Returns the menu that has the specified text label.
 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.
 java.lang.String toString()
           
 
Methods inherited from class charva.awt.Container
add, add, doLayout, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getCurrentFocus, getInsets, invalidate, isFocusTraversable, isValid, nextFocus, previousFocus, remove, requestFocus, setBackground, setFocus, setForeground, 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, getLocationOnScreen, getName, getParent, hasFocus, hide, isDisplayed, isEnabled, isTotallyObscured, isVisible, processEvent, processFocusEvent, processMouseEvent, repaint, requestSync, setBounds, setBounds, setBounds, setEnabled, setLocation, setLocation, setName, setParent, setVisible, show, validateCursesColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMenuBar

public JMenuBar()
Create a new menu bar

Method Detail

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.

getMenuCount

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


getMenu

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


getMenu

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


draw

public void draw()
Draw this menubar.

Overrides:
draw in class 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 class Container

minimumSize

public Dimension minimumSize()
Overrides:
minimumSize in class Container

getSize

public Dimension getSize()
Overrides:
getSize in class Container

getWidth

public int getWidth()
Overrides:
getWidth in class Container

getHeight

public int getHeight()
Overrides:
getHeight in class Container

debug

public void debug(int level_)
Output a text description of the menubar.

Overrides:
debug in class Container

toString

public java.lang.String toString()