Package java.awt.event

Examples of java.awt.event.WindowListener


   *
   * @param s
   *            The command line arguments
   */
  public static void main(String[] s) {
    WindowListener l = new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        System.exit(0);
      }
    };

View Full Code Here


                }
            }
        });

        // set the window listener
        dialog.addWindowListener(new WindowListener() {
            public void windowClosing(WindowEvent e) {
                close();
            }

            public void windowActivated(WindowEvent e) {
View Full Code Here

    } else
      currentLocale = Locale.getDefault();

    frame = new BankAdmin(currentLocale);
    frame.setTitle(messages.getString("CustAndAccountAdmin"));
    WindowListener l = new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
  System.exit(0);
      }
    };
    frame.addWindowListener(l);
View Full Code Here

        }
    }

    protected void processWindowEvent(WindowEvent e) {
        for (Iterator<?> i = windowListeners.getUserIterator(); i.hasNext();) {
            WindowListener listener = (WindowListener) i.next();
            switch (e.getID()) {
                case WindowEvent.WINDOW_ACTIVATED:
                    listener.windowActivated(e);
                    break;
                case WindowEvent.WINDOW_CLOSED:
                    listener.windowClosed(e);
                    break;
                case WindowEvent.WINDOW_CLOSING:
                    listener.windowClosing(e);
                    break;
                case WindowEvent.WINDOW_DEACTIVATED:
                    listener.windowDeactivated(e);
                    break;
                case WindowEvent.WINDOW_DEICONIFIED:
                    listener.windowDeiconified(e);
                    break;
                case WindowEvent.WINDOW_ICONIFIED:
                    listener.windowIconified(e);
                    break;
                case WindowEvent.WINDOW_OPENED:
                    listener.windowOpened(e);
                    break;
            }
        }
    }
View Full Code Here

    }

    public static void main(String[] args) {
        JFrame frame = new JFrame("MyDoggy Test");
        final MyDoggyToolWindowManager myDoggyToolWindowManager = init();
        frame.addWindowListener(new WindowListener() {
            public void windowActivated(WindowEvent e) {
            }

            public void windowClosed(WindowEvent e) {
                System.out.println("[pa] #windowClosed");
View Full Code Here

     */
    public void showCalendarFrame() {
        calendarFrame = new JXFrame("Calendar 2010");
        calendarFrame.setName("calendar2010");
        calendarFrame.setDefaultCloseOperation(JXFrame.DO_NOTHING_ON_CLOSE);
        WindowListener l = new WindowAdapter() {

            @Override
            public void windowClosing(WindowEvent e) {
                calendarFrame.removeWindowListener(this);
                hideCalendarFrame();
View Full Code Here

      @Override
      public void componentHidden(ComponentEvent e) {
        relocate();
      }
    });
    owner.addWindowListener(new WindowListener() {
      @Override
      public void windowOpened(WindowEvent e) {
      }

      @Override
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                //ATEConfigEditPanel configPanel = new  ATEConfigEditPanel(null);
                //configPanel.setVisible(true);
                MainConfigFrame configFrame = new MainConfigFrame();
                configFrame.launch();
                configFrame.addWindowListener(new WindowListener() {

                    public void windowOpened(WindowEvent e) {
                    }

                    public void windowClosing(WindowEvent e) {
View Full Code Here

                dialog = new JDialog((Frame)window, title, false);
            } else {
                dialog = new JDialog((Dialog)window, title, false);
            }
            if (window instanceof SwingUtilities.SharedOwnerFrame) {
                WindowListener ownerShutdownListener =
                        SwingUtilities.getSharedOwnerFrameShutdownListener();
                dialog.addWindowListener(ownerShutdownListener);
            }
            Container contentPane = dialog.getContentPane();
View Full Code Here

            dialog = new JDialog((Frame)window, title, true)
        } else {
            dialog = new JDialog((Dialog)window, title, true);
        }
   if (window instanceof SwingUtilities.SharedOwnerFrame) {
      WindowListener ownerShutdownListener =
    (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener();
       dialog.addWindowListener(ownerShutdownListener);
   }
        initDialog(dialog, style, parentComponent);
        return dialog;
View Full Code Here

TOP

Related Classes of java.awt.event.WindowListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.