public abstract class MenuComponent extends java.lang.Object implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
protected class |
MenuComponent.AccessibleAWTMenuComponent
This class provides a base for the accessibility support of menu
components.
|
| Constructor and Description |
|---|
MenuComponent()
Default constructor for subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispatchEvent(AWTEvent event)
Sends this event to this component or a subcomponent for processing.
|
javax.accessibility.AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this
MenuComponent. |
Font |
getFont()
Returns the font in use for this component.
|
java.lang.String |
getName()
Returns the name of this component.
|
MenuContainer |
getParent()
Returns the parent of this component.
|
java.awt.peer.MenuComponentPeer |
getPeer()
Deprecated.
|
protected java.lang.Object |
getTreeLock()
Returns the object used for synchronization locks on this component
when performing tree and layout functions.
|
protected java.lang.String |
paramString()
Returns a debugging string for this component
|
boolean |
postEvent(Event event)
Deprecated.
Deprecated in favor of
dispatchEvent(). |
protected void |
processEvent(AWTEvent event)
Processes the specified event.
|
void |
removeNotify()
Destroys this component's native peer
|
void |
setFont(Font font)
Sets the font for this component to the specified font.
|
void |
setName(java.lang.String name)
Sets the name of this component to the specified name.
|
java.lang.String |
toString()
Returns a string representation of this component.
|
public MenuComponent()
HeadlessException - ff GraphicsEnvironment.isHeadless() is truepublic Font getFont()
public void setFont(Font font)
font - the new font for this componentpublic java.lang.String getName()
public void setName(java.lang.String name)
name - the new name of this componentpublic MenuContainer getParent()
public java.awt.peer.MenuComponentPeer getPeer()
public void removeNotify()
protected final java.lang.Object getTreeLock()
public boolean postEvent(Event event)
dispatchEvent().public final void dispatchEvent(AWTEvent event)
event - The event to dispatchprotected void processEvent(AWTEvent event)
event - the event to processpublic java.lang.String toString()
toString in class java.lang.ObjectObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)protected java.lang.String paramString()
public javax.accessibility.AccessibleContext getAccessibleContext()
MenuComponent.
As an abstract class, we return null. Concrete subclasses should return
their implementation of the accessibility context.