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.
-
MenuComponent()
-
-
dispatchEvent(AWTEvent)
-
-
getFont()
- Gets the font used for this MenuItem.
-
getName()
- Gets the name of the menu component.
-
getParent()
- Returns the parent container.
-
getPeer()
-
Deprecated.
-
paramString()
- Returns the String parameter of this MenuComponent.
-
postEvent(Event)
- Posts the specified event to the menu.
-
processEvent(AWTEvent)
-
Processes events occurring on this menu component.
-
removeNotify()
- Removes the menu component's peer.
-
setFont(Font)
- Sets the font to be used for this MenuItem to the specified font.
-
setName(String)
- Sets the name of the component to the specified string.
-
toString()
- Returns the String representation of this MenuComponent's values.
MenuComponent
public MenuComponent()
getName
public String getName()
- Gets the name of the menu component.
setName
public void setName(String name)
- Sets the name of the component to the specified string.
- Parameters:
- name - the name of the component.
getParent
public MenuContainer getParent()
- Returns the parent container.
getPeer
public MenuComponentPeer getPeer()
- Note: getPeer() is deprecated.
As of JDK version 1.1,
programs should not directly manipulate peers.
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
dispatchEvent
public final void dispatchEvent(AWTEvent e)
processEvent
protected void processEvent(AWTEvent e)
- Processes events occurring on this menu component.
- Parameters:
- e - the event
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
All Packages Class Hierarchy This Package Previous Next Index