public abstract class MenuComponent extends Object implements 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.
|
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this
MenuComponent. |
Font |
getFont()
Returns the font in use for this component.
|
String |
getName()
Returns the name of this component.
|
MenuContainer |
getParent()
Returns the parent of this component.
|
MenuComponentPeer |
getPeer()
Deprecated.
|
protected Object |
getTreeLock()
Returns the object used for synchronization locks on this component
when performing tree and layout functions.
|
protected 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(String name)
Sets the name of this component to the specified name.
|
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 String getName()
public void setName(String name)
name - the new name of this componentpublic MenuContainer getParent()
public MenuComponentPeer getPeer()
public void removeNotify()
protected final 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 String toString()
toString in class ObjectObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)protected String paramString()
public AccessibleContext getAccessibleContext()
MenuComponent.
As an abstract class, we return null. Concrete subclasses should return
their implementation of the accessibility context.