| |
|
| java.lang.Object java.awt.MenuComponent
All known Subclasses: java.awt.MenuBar, java.awt.MenuItem,
MenuComponent | abstract public class MenuComponent implements java.io.Serializable(Code) | | The abstract class MenuComponent is the superclass
of all menu-related components. In this respect, the class
MenuComponent is analogous to the abstract superclass
Component for AWT components.
Menu components receive and process AWT events, just as components do,
through the method processEvent .
version: 1.88, 05/05/07 author: Arthur van Hoff since: JDK1.0 |
Constructor Summary | |
public | MenuComponent() Creates a MenuComponent . |
appContext | transient AppContext appContext(Code) | | The AppContext of the MenuComponent .
This is set in the constructor and never changes.
|
constructComponentName | String constructComponentName()(Code) | | Constructs a name for this MenuComponent .
Called by getName when the name is null .
a name for this MenuComponent |
dispatchEvent | final public void dispatchEvent(AWTEvent e)(Code) | | Delivers an event to this component or one of its sub components.
Parameters: e - the event |
getAccessibleChildIndex | int getAccessibleChildIndex(MenuComponent child)(Code) | | Gets the index of the child within this MenuComponent.
Parameters: child - MenuComponent whose index we are interested in. -1 if this object doesn't contain the child,otherwise, index of the child. |
getAccessibleContext | public AccessibleContext getAccessibleContext()(Code) | | Gets the AccessibleContext associated with
this MenuComponent .
The method implemented by this base class returns null .
Classes that extend MenuComponent
should implement this method to return the
AccessibleContext associated with the subclass.
the AccessibleContext of thisMenuComponent since: 1.3 |
getAccessibleIndexInParent | int getAccessibleIndexInParent()(Code) | | Gets the index of this object in its accessible parent.
-1 if this object does not have an accessible parent;otherwise, the index of the child in its accessible parent. |
getAccessibleStateSet | AccessibleStateSet getAccessibleStateSet()(Code) | | Gets the state of this object.
an instance of AccessibleStateSet containing the current state set of the object See Also: AccessibleState |
getFont_NoClientCode | final Font getFont_NoClientCode()(Code) | | |
getParent | public MenuContainer getParent()(Code) | | Returns the parent container for this menu component.
the menu component containing this menu component, or null if this menu component is the outermost component, the menu bar itself |
getTreeLock | final protected Object getTreeLock()(Code) | | Gets this component's locking object (the object that owns the thread
sychronization monitor) for AWT component-tree and layout
operations.
this component's locking object |
paramString | protected String paramString()(Code) | | Returns a string representing the state of this
MenuComponent . This method is intended to be used
only for debugging purposes, and the content and format of the
returned string may vary between implementations. The returned
string may be empty but may not be null .
the parameter string of this menu component |
postEvent | public boolean postEvent(Event evt)(Code) | | Posts the specified event to the menu.
This method is part of the Java 1.0 event system
and it is maintained only for backwards compatibility.
Its use is discouraged, and it may not be supported
in the future.
Parameters: evt - the event which is to take placeMenuComponent.dispatchEvent(AWTEvent) dispatchEvent |
processEvent | protected void processEvent(AWTEvent e)(Code) | | Processes events occurring on this menu component.
Note that if the event parameter is null
the behavior is unspecified and may result in an
exception.
Parameters: e - the event since: JDK1.1 |
removeNotify | public void removeNotify()(Code) | | 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.
|
setFont | public void setFont(Font f)(Code) | | Sets the font to be used for this menu component to the specified
font. This font is also used by all subcomponents of this menu
component, unless those subcomponents specify a different font.
Some platforms may not support setting of all font attributes
of a menu component; in such cases, calling setFont
will have no effect on the unsupported font attributes of this
menu component. Unless subcomponents of this menu component
specify a different font, this font will be used by those
subcomponents if supported by the underlying platform.
Parameters: f - the font to be set See Also: MenuComponent.getFont See Also: Font.getAttributes See Also: java.awt.font.TextAttribute |
toString | public String toString()(Code) | | Returns a representation of this menu component as a string.
a string representation of this menu component |
|
|
|