Java Doc for MenuComponent.java in  » 6.0-JDK-Core » AWT » java » awt » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » AWT » java.awt 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.MenuComponent

All known Subclasses:   java.awt.MenuBar,  java.awt.MenuItem,
MenuComponent
abstract public class MenuComponent implements java.io.Serializable(Code)
The abstract class MenuComponent is the superclass of all menu-related components. In this respect, the class MenuComponent is analogous to the abstract superclass Component for AWT components.

Menu components receive and process AWT events, just as components do, through the method processEvent.
version:
   1.88, 05/05/07
author:
   Arthur van Hoff
since:
   JDK1.0


Inner Class :abstract protected class AccessibleAWTMenuComponent extends AccessibleContext implements java.io.Serializable,AccessibleComponent,AccessibleSelection

Field Summary
 AccessibleContextaccessibleContext
    
final static  StringactionListenerK
    
transient  AppContextappContext
     The AppContext of the MenuComponent.
 Fontfont
     The menu component's font.
final static  StringitemListenerK
    
 booleannewEventsOnly
     Defaults to false.
transient  MenuContainerparent
    
transient  MenuComponentPeerpeer
    

Constructor Summary
public  MenuComponent()
     Creates a MenuComponent.

Method Summary
 StringconstructComponentName()
     Constructs a name for this MenuComponent.
final public  voiddispatchEvent(AWTEvent e)
     Delivers an event to this component or one of its sub components.
 voiddispatchEventImpl(AWTEvent e)
    
 booleaneventEnabled(AWTEvent e)
    
 intgetAccessibleChildIndex(MenuComponent child)
     Gets the index of the child within this MenuComponent.
Parameters:
  child - MenuComponent whose index we are interested in.
public  AccessibleContextgetAccessibleContext()
     Gets the AccessibleContext associated with this MenuComponent.
 intgetAccessibleIndexInParent()
     Gets the index of this object in its accessible parent.
 AccessibleStateSetgetAccessibleStateSet()
     Gets the state of this object.
public  FontgetFont()
     Gets the font used for this menu component.
final  FontgetFont_NoClientCode()
    
public  StringgetName()
     Gets the name of the menu component.
public  MenuContainergetParent()
     Returns the parent container for this menu component.
final  MenuContainergetParent_NoClientCode()
    
public  MenuComponentPeergetPeer()
    
final protected  ObjectgetTreeLock()
     Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
protected  StringparamString()
     Returns a string representing the state of this MenuComponent.
public  booleanpostEvent(Event evt)
     Posts the specified event to the menu.
protected  voidprocessEvent(AWTEvent e)
     Processes events occurring on this menu component.
public  voidremoveNotify()
     Removes the menu component's peer.
public  voidsetFont(Font f)
     Sets the font to be used for this menu component to the specified font.
public  voidsetName(String name)
     Sets the name of the component to the specified string.
public  StringtoString()
     Returns a representation of this menu component as a string.

Field Detail
accessibleContext
AccessibleContext accessibleContext(Code)



actionListenerK
final static String actionListenerK(Code)



appContext
transient AppContext appContext(Code)
The AppContext of the MenuComponent. This is set in the constructor and never changes.



font
Font font(Code)
The menu component's font. This value can be null at which point a default will be used. This defaults to null.
See Also:   MenuComponent.setFont(Font)
See Also:   MenuComponent.getFont()



itemListenerK
final static String itemListenerK(Code)



newEventsOnly
boolean newEventsOnly(Code)
Defaults to false.
See Also:   MenuComponent.dispatchEvent(AWTEvent)



parent
transient MenuContainer parent(Code)



peer
transient MenuComponentPeer peer(Code)




Constructor Detail
MenuComponent
public MenuComponent() throws HeadlessException(Code)
Creates a MenuComponent.
exception:
  HeadlessException - ifGraphicsEnvironment.isHeadlessreturns true
See Also:   java.awt.GraphicsEnvironment.isHeadless




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



dispatchEvent
final public void dispatchEvent(AWTEvent e)(Code)
Delivers an event to this component or one of its sub components.
Parameters:
  e - the event



dispatchEventImpl
void dispatchEventImpl(AWTEvent e)(Code)



eventEnabled
boolean eventEnabled(AWTEvent e)(Code)



getAccessibleChildIndex
int getAccessibleChildIndex(MenuComponent child)(Code)
Gets the index of the child within this MenuComponent.
Parameters:
  child - MenuComponent whose index we are interested in. -1 if this object doesn't contain the child,otherwise, index of the child.



getAccessibleContext
public AccessibleContext getAccessibleContext()(Code)
Gets the AccessibleContext associated with this MenuComponent. The method implemented by this base class returns null. Classes that extend MenuComponent should implement this method to return the AccessibleContext associated with the subclass. the AccessibleContext of thisMenuComponent
since:
   1.3



getAccessibleIndexInParent
int getAccessibleIndexInParent()(Code)
Gets the index of this object in its accessible parent. -1 if this object does not have an accessible parent;otherwise, the index of the child in its accessible parent.



getAccessibleStateSet
AccessibleStateSet getAccessibleStateSet()(Code)
Gets the state of this object. an instance of AccessibleStateSetcontaining the current state set of the object
See Also:   AccessibleState



getFont
public Font getFont()(Code)
Gets the font used for this menu component. the font used in this menu component, if there is one; null otherwise
See Also:   java.awt.MenuComponent.setFont



getFont_NoClientCode
final Font getFont_NoClientCode()(Code)



getName
public String getName()(Code)
Gets the name of the menu component. the name of the menu component
See Also:   java.awt.MenuComponent.setName(java.lang.String)
since:
   JDK1.1



getParent
public MenuContainer getParent()(Code)
Returns the parent container for this menu component. the menu component containing this menu component, or null if this menu component is the outermost component, the menu bar itself



getParent_NoClientCode
final MenuContainer getParent_NoClientCode()(Code)



getPeer
public MenuComponentPeer getPeer()(Code)



getTreeLock
final protected Object getTreeLock()(Code)
Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations. this component's locking object



paramString
protected String paramString()(Code)
Returns a string representing the state of this MenuComponent. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null. the parameter string of this menu component



postEvent
public boolean postEvent(Event evt)(Code)
Posts the specified event to the menu. This method is part of the Java 1.0 event system and it is maintained only for backwards compatibility. Its use is discouraged, and it may not be supported in the future.
Parameters:
  evt - the event which is to take placeMenuComponent.dispatchEvent(AWTEvent) dispatchEvent



processEvent
protected void processEvent(AWTEvent e)(Code)
Processes events occurring on this menu component.

Note that if the event parameter is null the behavior is unspecified and may result in an exception.
Parameters:
  e - the event
since:
   JDK1.1




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



setFont
public void setFont(Font f)(Code)
Sets the font to be used for this menu component to the specified font. This font is also used by all subcomponents of this menu component, unless those subcomponents specify a different font.

Some platforms may not support setting of all font attributes of a menu component; in such cases, calling setFont will have no effect on the unsupported font attributes of this menu component. Unless subcomponents of this menu component specify a different font, this font will be used by those subcomponents if supported by the underlying platform.
Parameters:
  f - the font to be set
See Also:   MenuComponent.getFont
See Also:   Font.getAttributes
See Also:   java.awt.font.TextAttribute




setName
public void setName(String name)(Code)
Sets the name of the component to the specified string.
Parameters:
  name - the name of the menu component
See Also:   java.awt.MenuComponent.getName
since:
   JDK1.1



toString
public String toString()(Code)
Returns a representation of this menu component as a string. a string representation of this menu component



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.