public interface HierarchyListener extends EventListener
addHierarchyListener
方法将从该类创建的侦听器对象注册到组件。
当组件所属的层次更改时,将调用侦听器对象中的hierarchyChanged
方法,并将HierarchyEvent
传递给它。
层次结构事件仅供通报用途; AWT将自动处理层次结构内部的更改,以使GUI布局,可显示性和可见性正常工作,无论程序是否注册HierarchyListener
。
HierarchyEvent
Modifier and Type | Method and Description |
---|---|
void |
hierarchyChanged(HierarchyEvent e)
当层次结构被更改时调用。
|
void hierarchyChanged(HierarchyEvent e)
HierarchyEvent.getChangeFlags()
。
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.