Packages  This Package  Prev  Next  Index  
	§1.31 Class MenuComponent
public  abstract  class  java.awt.MenuComponent
    extends  java.lang.Object  (I-§1.12)
{
        // Constructors
    public MenuComponent();	§1.31.1
        // Methods
    public Font getFont();	§1.31.2
    public MenuContainer getParent();	§1.31.3
    public MenuComponentPeer getPeer();	§1.31.4
    protected String paramString();	§1.31.5
    public boolean postEvent(Event  evt);	§1.31.6
    public void removeNotify();	§1.31.7
    public void setFont(Font  f);	§1.31.8
    public String toString();	§1.31.9
}
The abstract class MenuComponent is the superclass of all menu related components.
MenuComponent
public MenuComponent()
- The default constructor.
 
getFont
public Font getFont()
- Returns:
 - the font used in this menu component, if there is one; null otherwise.
 
getParent
public MenuContainer getParent()
- Returns:
 - returns the menu component containing this menu component; null if 
this is the outermost component, the menu bar itself.
 
getPeer
public MenuComponentPeer getPeer()
- Returns this menu component's peer. Every menu component has a peer 
associated with it. This peer allows the application to change the look of a 
menu component without changing its functionality.
- Returns:
 - the menu component's peer.
 
 
paramString
protected String paramString()
- Returns the parameter string representing the state of this menu component. This string is useful for debugging.
- Returns:
 - the parameter string of this menu component.
 
 
postEvent
public boolean postEvent(Event  evt)
- Posts an event to this menu component, by calling its handleEvent method. 
If handleEvent returns false, then post the event to the menu component's 
parent.
- Parameters:
 evt
- the event
- Returns:
 - true if this menu component or one of its parents handled the event; 
false otherwise.
 
 
removeNotify
public void removeNotify()
- Notifies this menu component to destroy its peer.
 
setFont
public void setFont(Font  f)
- Sets the font to be used for this menu component to the specified font. This 
font is also used by all subcomponents of the menu component, unless 
those subcomponents specify a different font.
- Parameters:
 f
- the font to be set
 
toString
- Returns:
 - a string representation of this menu component.
 - Overrides:
 - toString in class Object  (I-§1.12.9).
 
Packages  This Package  Prev  Next  Index
Java API Document (HTML generated by dkramer on April 22, 1996)
Copyright © 1996 Sun Microsystems, Inc.
All rights reserved
Please send any comments or corrections to doug.kramer@sun.com