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