java.awt
Class MenuComponent

java.lang.Object
  |
  +--java.awt.MenuComponent
Direct Known Subclasses:
MenuBar, MenuItem

public abstract class MenuComponent
extends Object

The super class of all menu related components.


Constructor Summary
MenuComponent()
           
 
Method Summary
 Font getFont()
          Gets the font used for this MenuItem.
 MenuContainer getParent()
          Returns the parent container.
 java.awt.peer.MenuComponentPeer getPeer()
          Gets the MenuComponent's peer.
protected  String paramString()
          Returns the String parameter of this MenuComponent.
 boolean postEvent(Event evt)
          Posts the specified event to the menu.
 void removeNotify()
          Removes the menu component's peer.
 void setFont(Font f)
          Sets the font to be used for this MenuItem to the specified font.
 String toString()
          Returns the String representation of this MenuComponent's values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MenuComponent

public MenuComponent()
Method Detail

getParent

public MenuContainer getParent()
Returns the parent container.


getPeer

public java.awt.peer.MenuComponentPeer getPeer()
Gets the MenuComponent's peer. The peer allows us to modify the appearance of the menu component without changing the functionality of the menu component.


getFont

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

Returns:
the font if one is used; null otherwise.

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

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.


postEvent

public boolean postEvent(Event evt)
Posts the specified event to the menu.

Parameters:
evt - the event which is to take place

paramString

protected String paramString()
Returns the String parameter of this MenuComponent.


toString

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

Overrides:
toString in class Object