Examples of addWindowListener()


Examples of javax.swing.JDialog.addWindowListener()

      //      jf.getContentPane().setLayout(new BorderLayout());
      //    jf.getContentPane().add((JComponent)customizer, BorderLayout.CENTER);
      if (customizer instanceof CustomizerCloseRequester) {
        ((CustomizerCloseRequester)customizer).setParentWindow(d);
      }
      d.addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent e) {
          if (customizer instanceof CustomizerClosingListener) {
            ((CustomizerClosingListener)customizer).customizerClosing();
          }
          d.dispose();
View Full Code Here

Examples of javax.swing.JDialog.addWindowListener()

   */
  protected JDialog createDialog(final Component c, String name){
    JDialog jd=new JDialog(owner, name);
    jd.getContentPane().add(c);
    jd.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    jd.addWindowListener(new WindowAdapter(){

      public void windowClosed(WindowEvent e) {
        Element el=getElement(c);
        changeElement(c,el.previousMode);
      }
View Full Code Here

Examples of javax.swing.JDialog.addWindowListener()

        result.getContentPane().add(buttonPanel, BorderLayout.SOUTH);
        //
        result.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        final Action localOkAction = okAction;
        final Action localCancelAction = cancelAction;
        result.addWindowListener(new WindowAdapter() {
            public void windowClosed(WindowEvent e) {
                if (localCancelAction != null && !commiter.isCommited()) {
                    localCancelAction.actionPerformed(null);
                }
            }
View Full Code Here

Examples of javax.swing.JDialog.addWindowListener()

          }
        });     
    }
    separateDialog.setContentPane(component);
    separateDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
    separateDialog.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent ev) {
          controller.attachView(view);
        }
      });
View Full Code Here

Examples of javax.swing.JDialog.addWindowListener()

        }
      } else {
        dialog.setLocationByPlatform(true);
      }
     
      dialog.addWindowListener(new WindowAdapter() {
        public void windowClosed(WindowEvent ev) {
          stopVideoCreation(false);
          if (playbackTimer != null) {
            pausePlayback();
          }
View Full Code Here

Examples of javax.swing.JDialog.addWindowListener()

          public void componentResized(ComponentEvent ev) {
            controller.set3DViewAspectRatio((float)view3D.getWidth() / view3D.getHeight());
          }
        };
      view3D.addComponentListener(view3DSizeListener);
      dialog.addWindowListener(new WindowAdapter() {
          public void windowClosed(WindowEvent ev) {
            ((JComponent)controller.get3DView()).removeComponentListener(view3DSizeListener);
            stopPhotoCreation(false);
            currentPhotoPanel = null;
          }
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

      final PreprocessPanel sp = new PreprocessPanel();
      jf.getContentPane().add(sp, BorderLayout.CENTER);
      weka.gui.LogPanel lp = new weka.gui.LogPanel();
      sp.setLog(lp);
      jf.getContentPane().add(lp, BorderLayout.SOUTH);
      jf.addWindowListener(new WindowAdapter() {
  public void windowClosing(WindowEvent e) {
    jf.dispose();
    System.exit(0);
  }
      });
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

    }
    final JFrame jf = new JFrame("Visualize");
    jf.setSize(800,600);
    jf.getContentPane().setLayout(new BorderLayout());
    jf.getContentPane().add(vis, BorderLayout.CENTER);
    jf.addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent e) {
    jf.dispose();
    m_framePoppedUp = false;
        }
      });
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

        FurnitureLibraryEditor.class.getResource("resources/frameIcon.png")).getImage());
    furnitureFrame.setLocationByPlatform(true);
    furnitureFrame.pack();
    furnitureFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    furnitureFrame.setVisible(true);
    furnitureFrame.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent ev) {
          editorController.exit();
        }
      });
View Full Code Here

Examples of javax.swing.JFrame.addWindowListener()

    total++;

    setPreferredSize(new Dimension(200,30*itemCount));
    JFrame frame = new JFrame(controller.getName());
    frame.setContentPane(new JScrollPane(this));
    frame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        total--;
        if (total == 0) {
          System.exit(0);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.