// WARNING: it's called on the Toolkit thread! void preprocessPostEvent(AWTEvent event) { if (event instanceof WindowEvent) { WindowListener listener = windowListener; if (listener != null) { switch (event.getID()) { case WindowEvent.WINDOW_CLOSING: listener.windowClosing((WindowEvent) event); break; case WindowEvent.WINDOW_ICONIFIED: listener.windowIconified((WindowEvent) event); break; } } } }
/** * Handles the windowIconified event by invoking the windowIconified methods on listener-a and * listener-b. * * @param e the window event */ public void windowIconified(WindowEvent e) { ((WindowListener) a).windowIconified(e); ((WindowListener) b).windowIconified(e); }