Java Doc for MenuBar.java in  » 6.0-JDK-Modules » j2me » java » awt » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.awt 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.MenuComponent
      java.awt.MenuBar

MenuBar
public class MenuBar extends MenuComponent implements MenuContainer(Code)
The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame. In order to associate the menu bar with a Frame object, call the frame's setMenuBar method.

This is what a menu bar might look like:

A menu bar handles keyboard shortcuts for menu items, passing them along to its child menus. (Keyboard shortcuts, which are optional, provide the user with an alternative to the mouse for invoking a menu item and the action that is associated with it.) Each menu item can maintain an instance of MenuShortcut. The MenuBar class defines several methods, MenuBar.shortcuts and MenuBar.getShortcutMenuItem that retrieve information about the shortcuts a given menu bar is managing.
version:
   1.56, 08/19/02
author:
   Sami Shaio
See Also:   java.awt.Frame
See Also:   java.awt.Frame.setMenuBar(java.awt.MenuBar)
See Also:   java.awt.Menu
See Also:   java.awt.MenuItem
See Also:   java.awt.MenuShortcut
since:
   JDK1.0



Field Summary
 MenuhelpMenu
     This menu is a special menu dedicated to help.
 Vectormenus
     This field represents a vector of the actual menus that will be part of the MenuBar.

Constructor Summary
public  MenuBar()
     Creates a new menu bar.

Method Summary
public  Menuadd(Menu m)
     Adds the specified menu to the menu bar.
Parameters:
  m - the menu to be added.
public  voidaddNotify()
     Creates the menu bar's peer.
 StringconstructComponentName()
     Construct a name for this MenuComponent.
public  intcountMenus()
    
public  voiddeleteShortcut(MenuShortcut s)
     Deletes the specified menu shortcut.
public  MenugetHelpMenu()
     Gets the help menu on the menu bar.
public  MenugetMenu(int i)
     Gets the specified menu.
Parameters:
  i - the index position of the menu to be returned.
public  intgetMenuCount()
     Gets the number of menus on the menu bar.
public  MenuItemgetShortcutMenuItem(MenuShortcut s)
     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.
 booleanhandleShortcut(KeyEvent e)
    
public  voidremove(int index)
     Removes the menu located at the specified index from this menu bar.
public  voidremove(MenuComponent m)
     Removes the specified menu component from this menu bar.
public  voidremoveNotify()
     Removes the menu bar's peer.
public  voidsetHelpMenu(Menu m)
     Sets the specified menu to be this menu bar's help menu.
public synchronized  Enumerationshortcuts()
     Gets an enumeration of all menu shortcuts this menu bar is managing.

Field Detail
helpMenu
Menu helpMenu(Code)
This menu is a special menu dedicated to help. The one thing to note about this menu is that on some platforms it appears at the right edge of the menubar.
See Also:    getHelpMenu()
See Also:    setHelpMenu()



menus
Vector menus(Code)
This field represents a vector of the actual menus that will be part of the MenuBar.
See Also:    countMenus()




Constructor Detail
MenuBar
public MenuBar()(Code)
Creates a new menu bar.




Method Detail
add
public Menu add(Menu m)(Code)
Adds the specified menu to the menu bar.
Parameters:
  m - the menu to be added. the menu added.
See Also:   java.awt.MenuBar.remove(int)
See Also:   java.awt.MenuBar.remove(java.awt.MenuComponent)
since:
   JDK1.0



addNotify
public void addNotify()(Code)
Creates the menu bar's peer. The peer allows us to change the appearance of the menu bar without changing any of the menu bar's functionality.



constructComponentName
String constructComponentName()(Code)
Construct a name for this MenuComponent. Called by getName() when the name is null.



countMenus
public int countMenus()(Code)



deleteShortcut
public void deleteShortcut(MenuShortcut s)(Code)
Deletes the specified menu shortcut.
Parameters:
  s - the menu shortcut to delete.
since:
   JDK1.1



getHelpMenu
public Menu getHelpMenu()(Code)
Gets the help menu on the menu bar. the help menu on this menu bar.



getMenu
public Menu getMenu(int i)(Code)
Gets the specified menu.
Parameters:
  i - the index position of the menu to be returned. the menu at the specified index of this menu bar.



getMenuCount
public int getMenuCount()(Code)
Gets the number of menus on the menu bar. the number of menus on the menu bar.
since:
   JDK1.1



getShortcutMenuItem
public MenuItem getShortcutMenuItem(MenuShortcut s)(Code)
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.
Parameters:
  s - the specified menu shortcut.
See Also:   java.awt.MenuItem
See Also:   java.awt.MenuShortcut
since:
   JDK1.1



handleShortcut
boolean handleShortcut(KeyEvent e)(Code)



remove
public void remove(int index)(Code)
Removes the menu located at the specified index from this menu bar.
Parameters:
  index - the position of the menu to be removed.
See Also:   java.awt.MenuBar.add(java.awt.Menu)



remove
public void remove(MenuComponent m)(Code)
Removes the specified menu component from this menu bar.
Parameters:
  m - the menu component to be removed.
See Also:   java.awt.MenuBar.add(java.awt.Menu)



removeNotify
public void removeNotify()(Code)
Removes the menu bar's peer. The peer allows us to change the appearance of the menu bar without changing any of the menu bar's functionality.



setHelpMenu
public void setHelpMenu(Menu m)(Code)
Sets the specified menu to be this menu bar's help menu. If this menu bar has an existing help menu, the old help menu is removed from the menu bar, and replaced with the specified menu.
Parameters:
  m - the menu to be set as the help menu



shortcuts
public synchronized Enumeration shortcuts()(Code)
Gets an enumeration of all menu shortcuts this menu bar is managing. an enumeration of menu shortcuts that thismenu bar is managing.
See Also:   java.awt.MenuShortcut
since:
   JDK1.1



Fields inherited from java.awt.MenuComponent
final static String actionListenerK(Code)(Java Doc)
transient AppContext appContext(Code)(Java Doc)
Font font(Code)(Java Doc)
final static String itemListenerK(Code)(Java Doc)
boolean newEventsOnly(Code)(Java Doc)
transient MenuContainer parent(Code)(Java Doc)
transient MenuComponentPeer peer(Code)(Java Doc)

Methods inherited from java.awt.MenuComponent
String constructComponentName()(Code)(Java Doc)
final public void dispatchEvent(AWTEvent e)(Code)(Java Doc)
void dispatchEventImpl(AWTEvent e)(Code)(Java Doc)
boolean eventEnabled(AWTEvent e)(Code)(Java Doc)
public Font getFont()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public MenuContainer getParent()(Code)(Java Doc)
final protected Object getTreeLock()(Code)(Java Doc)
protected String paramString()(Code)(Java Doc)
public boolean postEvent(Event evt)(Code)(Java Doc)
protected void processEvent(AWTEvent e)(Code)(Java Doc)
public void removeNotify()(Code)(Java Doc)
public void setFont(Font f)(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.