Package java.awt.event

Examples of java.awt.event.WindowAdapter


        pack();
       
        applySettings();
        setCenteredLocation();
       
        addWindowListener(new WindowAdapter() {
            @Override
            public void windowOpened(WindowEvent we) {
                try {
                 
                    for (DcFieldDefinition definition : module.getFieldDefinitions().getDefinitions()) {
View Full Code Here


    private AtomicBoolean active;

    public DcDialog(JFrame parent) {
        super(parent);
       
        addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                close();
            }
        });
View Full Code Here

        super(title);
       
        setIconImage(icon == null ? IconLibrary._icoMain.getImage() : icon.getImage());
       
        DcSwingUtilities.setRootFrame(this);
        addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                close();
            }
        });
View Full Code Here

     * WindowAdapter that calls System.exit(0), killing java. You can extend
     * this to add a WindowListener to the OpenMapFrame that does nothing or
     * something else.
     */
    protected void setWindowListenerOnFrame(OpenMapFrame omf) {
        omf.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
    }
View Full Code Here

        // Use a Border layout manager
        getContentPane().setLayout(new BorderLayout());

        // Call quit when the window's close box is clicked.
        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                quit();
            }
        });
View Full Code Here

        }
      });
    }

    public void setCloseListener (final Runnable listener) {
      addWindowListener(new WindowAdapter() {
        public void windowClosed (WindowEvent evt) {
          listener.run();
        }

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

        }
      });
    }

    public void setCloseListener (final Runnable listener) {
      addWindowListener(new WindowAdapter() {
        public void windowClosed (WindowEvent evt) {
          listener.run();
        }

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

        // glassPane.setVisible(true);

        setTitle(GUIGlobals.frameTitle);
        setIconImage(GUIGlobals.getImage("jabrefIcon").getImage());
        setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                (new CloseAction()).actionPerformed(null);
            }
        });
View Full Code Here

      });

      JScrollPane scrollpane = new JScrollPane(table);     
      getContentPane().add(scrollpane);

      addWindowListener( new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
          dispose();
        }
      });
View Full Code Here

   
    if (canvasPeer instanceof com.xith3d.render.jogl.CanvasPeerImpl)
        ((com.xith3d.render.jogl.CanvasPeerImpl)canvasPeer).setWindow(peerWindow);
   
    // Add Listener to set the window invisible instead of exiting the application
    peerWindow.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                peerWindow.setVisible(false);
            }
    });
   
View Full Code Here

TOP

Related Classes of java.awt.event.WindowAdapter

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.