public class AncestorEvent extends AWTEvent
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans
包。请看XMLEncoder
。
Modifier and Type | Field and Description |
---|---|
static int |
ANCESTOR_ADDED
一个祖先组件添加到可见对象(已可见)的层次结构中,并且当前正在显示。
|
static int |
ANCESTOR_MOVED
一个祖先组件改变了它在屏幕上的位置。
|
static int |
ANCESTOR_REMOVED
从可见对象(隐藏)的层次结构中删除一个祖先组件,并不再显示。
|
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
source
Constructor and Description |
---|
AncestorEvent(JComponent source, int id, Container ancestor, Container ancestorParent)
构建以确定一个祖先组件的显示状态改变ancestorevent对象。
|
Modifier and Type | Method and Description |
---|---|
Container |
getAncestor()
返回事件实际发生的祖先。
|
Container |
getAncestorParent()
返回发生在实际发生的事件的父的父。
|
JComponent |
getComponent()
返回侦听器添加到的组件。
|
consume, getID, isConsumed, paramString, setSource, toString
getSource
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
int,
ANCESTOR_REMOVED
或
ANCESTOR_MOVED
ancestor
-一个容器对象指定祖先组件显示状态的改变
ancestorParent
-一个容器对象指定的祖先的母
public Container getAncestor()
public Container getAncestorParent()
public JComponent getComponent()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.