位置:首页 > Java技术 > AWT > AWT MenuComponent类

AWT MenuComponent类

MenuComponent是一个抽象类,并为所有菜单相关的组件的超类。

类的声明

以下是声明的java.awt.MenuComponent类:

public abstract class MenuComponent
   extends Object
      implements Serializable

类的构造函数

S.N. 构造函数与说明
1 MenuComponent() 
Creates a MenuComponent.

类方法

void dispatchEvent(AWTEvent e)
S.N. 方法及说明
1 AccessibleContext getAccessibleContext() 
Gets the AccessibleContext associated with this MenuComponent.
2 Font getFont() 
Gets the font used for this menu component.
3 String getName() 
Gets the name of the menu component.
4 MenuContainer getParent() 
Returns the parent container for this menu component.
5 java.awt.peer.MenuComponentPeer getPeer() 
Deprecated. As of JDK version 1.1, programs should not directly manipulate peers.
6 protected Object getTreeLock() 
Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
7 protected String paramString() 
Returns a string representing the state of this MenuComponent.
8 boolean postEvent(Event evt) 
Deprecated. As of JDK version 1.1, replaced by dispatchEvent.
9 protected void processEvent(AWTEvent e) 
Processes events occurring on this menu component.
10 void removeNotify() 
Removes the menu component's peer.
11 void setFont(Font f) 
Sets the font to be used for this menu component to the specified font.
12 void setName(String name) 
Sets the name of the component to the specified string.
13 String toString() 
Returns a representation of this menu component as a string.

继承的方法

这个类继承的方法从以下类:

  • java.lang.Object