public interface WindowListener extends EventListener
WindowAdapter
类(只覆盖方法的兴趣)。从这个类进行了注册一个窗口使用窗口的
addWindowListener
方法创建监听对象。当窗口的状态发生变化的被打开,美德关闭,激活或关闭,或deiconified图标,在监听对象相关的方法被调用时,与
WindowEvent
传递给它。
WindowAdapter
,
WindowEvent
,
Tutorial: How to Write Window Listeners
Modifier and Type | Method and Description |
---|---|
void |
windowActivated(WindowEvent e)
当窗口被设置为活动窗口时调用。
|
void |
windowClosed(WindowEvent e)
当一个窗口被关闭,作为调用在窗口上的处理结果时调用的。
|
void |
windowClosing(WindowEvent e)
当用户试图关闭从窗口的系统菜单中的窗口时调用。
|
void |
windowDeactivated(WindowEvent e)
当一个窗口不再是活动窗口时调用。
|
void |
windowDeiconified(WindowEvent e)
当一个窗口从最小化到一个正常状态时调用。
|
void |
windowIconified(WindowEvent e)
当一个窗口从一个正常的到最小状态改变时调用。
|
void |
windowOpened(WindowEvent e)
第一次调用一个窗口是可见的。
|
void windowOpened(WindowEvent e)
void windowClosing(WindowEvent e)
void windowClosed(WindowEvent e)
void windowIconified(WindowEvent e)
void windowDeiconified(WindowEvent e)
void windowActivated(WindowEvent e)
void windowDeactivated(WindowEvent e)
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.