Example usage for java.awt.event HierarchyListener hierarchyChanged

List of usage examples for java.awt.event HierarchyListener hierarchyChanged

Introduction

In this page you can find the example usage for java.awt.event HierarchyListener hierarchyChanged.

Prototype

public void hierarchyChanged(HierarchyEvent e);

Source Link

Document

Called when the hierarchy has been changed.

Usage

From source file:com.mac.tarchan.desktop.event.EventQuery.java

/**
 * ???????????/*from   w w  w .ja v  a  2s .c o  m*/
 * 
 * @param hierarchyChanged ?
 * @return ??
 * @see <a href="http://terai.xrea.jp/Swing/DefaultFocus.html ">Window?????? - Java Swing Tips</a>
 * @see HierarchyListener#hierarchyChanged(HierarchyEvent)
 */
public EventQuery ready(final HierarchyListener hierarchyChanged) {
    for (Component child : list) {
        child.addHierarchyListener(new HierarchyListener() {
            public void hierarchyChanged(HierarchyEvent e) {
                if (e.getChangeFlags() == HierarchyEvent.DISPLAYABILITY_CHANGED)
                    hierarchyChanged.hierarchyChanged(e);
            }
        });
    }
    return this;
}