All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.MenuComponent

java.lang.Object
   |
   +----java.awt.MenuComponent

public abstract class MenuComponent
extends Object
implements Serializable
The super class of all menu related components.


Constructor Index

 o MenuComponent()

Method Index

 o dispatchEvent(AWTEvent)
 o getFont()
Gets the font used for this MenuItem.
 o getName()
Gets the name of the menu component.
 o getParent()
Returns the parent container.
 o getPeer()
Deprecated.
 o paramString()
Returns the String parameter of this MenuComponent.
 o postEvent(Event)
Posts the specified event to the menu. Deprecated.
 o processEvent(AWTEvent)
Processes events occurring on this menu component.
 o removeNotify()
Removes the menu component's peer.
 o setFont(Font)
Sets the font to be used for this MenuItem to the specified font.
 o setName(String)
Sets the name of the component to the specified string.
 o toString()
Returns the String representation of this MenuComponent's values.

Constructors

 o MenuComponent
 public MenuComponent()

Methods

 o getName
 public String getName()
Gets the name of the menu component.

 o setName
 public void setName(String name)
Sets the name of the component to the specified string.

Parameters:
name - the name of the component.
 o getParent
 public MenuContainer getParent()
Returns the parent container.

 o getPeer
 public MenuComponentPeer getPeer()
Note: getPeer() is deprecated. As of JDK version 1.1, programs should not directly manipulate peers.

 o getFont
 public Font getFont()
Gets the font used for this MenuItem.

Returns:
the font if one is used; null otherwise.
 o setFont
 public void setFont(Font f)
Sets the font to be used for this MenuItem to the specified font.

Parameters:
f - the font to be set
 o removeNotify
 public void removeNotify()
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.

 o postEvent
 public boolean postEvent(Event evt)
Note: postEvent() is deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).

Posts the specified event to the menu.

Parameters:
evt - the event which is to take place
 o dispatchEvent
 public final void dispatchEvent(AWTEvent e)
 o processEvent
 protected void processEvent(AWTEvent e)
Processes events occurring on this menu component.

Parameters:
e - the event
 o paramString
 protected String paramString()
Returns the String parameter of this MenuComponent.

 o toString
 public String toString()
Returns the String representation of this MenuComponent's values.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Submit a bug or feature