MenuComponent是一個抽象類,並為所有選單相關的元件的超類。
以下是宣告的java.awt.MenuComponent類:
public abstract class MenuComponent extends Object implements Serializable
S.N. | 建構函式與說明 |
---|---|
1 |
MenuComponent() Creates a MenuComponent. |
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