|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.util.EventObject
java.awt.AWTEvent
javax.swing.event.AncestorEvent
public class AncestorEvent
報告給子元件的事件,該子元件源自元件層次結構中的某個祖先。
警告:此類別的序列化物件將與以後的 Swing 版本不相容。當前的序列化支持適用於短期存儲或運行相同 Swing 版本的應用程序之間的 RMI。從 1.4 版本開始,已在 java.beans 套件中添加了支持所有 JavaBeansTM 長期存儲的功能。請參見 XMLEncoder。
| 欄位摘要 | |
|---|---|
static int |
ANCESTOR_ADDED
某個祖先元件被添加到可見物件的層次結構中(使其可見),並且目前正顯示該元件。 |
static int |
ANCESTOR_MOVED
某個祖先元件更改了其螢幕位置。 |
static int |
ANCESTOR_REMOVED
某個祖先元件從可見物件的層次結構中被移除(隱藏它),並且不再顯示該元件。 |
| 從類別 java.util.EventObject 繼承的欄位 |
|---|
source |
| 建構子摘要 | |
|---|---|
AncestorEvent(JComponent source,
int id,
Container ancestor,
Container ancestorParent)
建構一個 AncestorEvent 物件,以標識祖先元件顯示狀態的更改。 |
|
| 方法摘要 | |
|---|---|
Container |
getAncestor()
返回實際發生事件的祖先元件。 |
Container |
getAncestorParent()
返回實際發生事件的祖先元件的父元件。 |
JComponent |
getComponent()
返回添加了偵聽器的元件。 |
| 從類別 java.awt.AWTEvent 繼承的方法 |
|---|
consume, getID, isConsumed, paramString, setSource, toString |
| 從類別 java.util.EventObject 繼承的方法 |
|---|
getSource |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 欄位詳細資訊 |
|---|
public static final int ANCESTOR_ADDED
public static final int ANCESTOR_REMOVED
public static final int ANCESTOR_MOVED
| 建構子詳細資訊 |
|---|
public AncestorEvent(JComponent source,
int id,
Container ancestor,
Container ancestorParent)
source - 發起事件的 JComponent(通常為 this)id - 指定 ANCESTOR_ADDED、ANCESTOR_REMOVED 或 ANCESTOR_MOVED 的 int 值ancestor - 指定顯示狀態已發生更改的祖先容器的 Container 物件ancestorParent - 指定祖先容器的父容器的 Container 物件| 方法詳細資訊 |
|---|
public Container getAncestor()
public Container getAncestorParent()
public JComponent getComponent()
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。