|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.MenuComponent | +--java.awt.MenuBar
Unsafe:
Field Summary | |
private static String |
base
|
(package private) Menu |
helpMenu
This menu is a special menu dedicated to help. |
private int |
menuBarSerializedDataVersion
The MenuBar's serialized data version. |
(package private) Vector |
menus
This field represents a vector of the actual menus that will be part of the MenuBar. |
private static int |
nameCounter
|
private static long |
serialVersionUID
|
Fields inherited from class java.awt.MenuComponent |
accessibleContext, actionListenerK, appContext, font, itemListenerK, newEventsOnly, parent, peer |
Constructor Summary | |
MenuBar()
Suppressed: Creates a new menu bar. |
Method Summary | |
Menu |
add(Menu m)
Suppressed: Adds the specified menu to the menu bar. |
void |
addNotify()
Suppressed: Creates the menu bar's peer. |
(package private) String |
constructComponentName()
Construct a name for this MenuComponent. |
int |
countMenus()
Suppressed: @deprecated As of JDK version 1.1, replaced by getMenuCount() . |
void |
deleteShortcut(MenuShortcut s)
Suppressed: Deletes the specified menu shortcut. |
AccessibleContext |
getAccessibleContext()
Suppressed: Gets the AccessibleContext associated with this MenuBar. |
Menu |
getHelpMenu()
Suppressed: Gets the help menu on the menu bar. |
Menu |
getMenu(int i)
Suppressed: Gets the specified menu. |
int |
getMenuCount()
Suppressed: Gets the number of menus on the menu bar. |
(package private) int |
getMenuCountImpl()
|
(package private) Menu |
getMenuImpl(int i)
|
MenuItem |
getShortcutMenuItem(MenuShortcut s)
Suppressed: Gets the instance of MenuItem associated
with the specified MenuShortcut object,
or null if none of the menu items being managed
by this menu bar is associated with the specified menu
shortcut. |
(package private) boolean |
handleShortcut(KeyEvent e)
|
private static void |
initIDs()
Initialize JNI field and method IDs |
private void |
readObject(ObjectInputStream s)
Reads the ObjectInputStream . |
void |
remove(int index)
Suppressed: Removes the menu located at the specified index from this menu bar. |
void |
remove(MenuComponent m)
Suppressed: Removes the specified menu component from this menu bar. |
void |
removeNotify()
Suppressed: Removes the menu bar's peer. |
void |
setHelpMenu(Menu m)
Suppressed: Sets the specified menu to be this menu bar's help menu. |
Enumeration |
shortcuts()
Suppressed: Gets an enumeration of all menu shortcuts this menu bar is managing. |
private void |
writeObject(ObjectOutputStream s)
Writes default serializable fields to stream. |
Methods inherited from class java.awt.MenuComponent |
dispatchEvent, dispatchEventImpl, eventEnabled, getAccessibleIndexInParent, getAccessibleStateSet, getFont_NoClientCode, getFont, getName, getParent_NoClientCode, getParent, getPeer, getTreeLock, paramString, postEvent, processEvent, setFont, setName, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
Vector menus
countMenus()
Menu helpMenu
getHelpMenu()
,
setHelpMenu()
private static final String base
private static int nameCounter
private static final long serialVersionUID
private int menuBarSerializedDataVersion
Constructor Detail |
public MenuBar() throws HeadlessException
java.awt.GraphicsEnvironment#isHeadless
Method Detail |
String constructComponentName()
constructComponentName
in class MenuComponent
MenuComponent
public void addNotify()
public void removeNotify()
removeNotify
in class MenuComponent
public Menu getHelpMenu()
public void setHelpMenu(Menu m)
m
- the menu to be set as the help menupublic Menu add(Menu m)
m
- the menu to be added.
java.awt.MenuBar#remove(int)
,
java.awt.MenuBar#remove(java.awt.MenuComponent)
public void remove(int index)
index
- the position of the menu to be removed.java.awt.MenuBar#add(java.awt.Menu)
public void remove(MenuComponent m)
remove
in interface MenuContainer
m
- the menu component to be removed.java.awt.MenuBar#add(java.awt.Menu)
public int getMenuCount()
public int countMenus()
getMenuCount()
.
final int getMenuCountImpl()
public Menu getMenu(int i)
i
- the index position of the menu to be returned.
final Menu getMenuImpl(int i)
public Enumeration shortcuts()
java.awt.MenuShortcut
public MenuItem getShortcutMenuItem(MenuShortcut s)
MenuItem
associated
with the specified MenuShortcut
object,
or null
if none of the menu items being managed
by this menu bar is associated with the specified menu
shortcut.
s
- the specified menu shortcut.java.awt.MenuItem
,
java.awt.MenuShortcut
boolean handleShortcut(KeyEvent e)
public void deleteShortcut(MenuShortcut s)
s
- the menu shortcut to delete.private void writeObject(ObjectOutputStream s) throws ClassNotFoundException, IOException
s
- the ObjectOutputStream
to write
ClassNotFoundException
IOException
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener)
,
readObject(java.io.ObjectInputStream)
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException, HeadlessException
ObjectInputStream
.
Unrecognized keys or values will be ignored.
s
- the ObjectInputStream
to read
ClassNotFoundException
IOException
HeadlessException
java.awt.GraphicsEnvironment#isHeadless
,
readObject(java.io.ObjectInputStream)
private static void initIDs()
public AccessibleContext getAccessibleContext()
getAccessibleContext
in interface Accessible
getAccessibleContext
in class MenuComponent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |