Package javax.swing

Examples of javax.swing.JDialog.addWindowListener()


    if (PropertyDialog.getParentDialog(this) != null)
      jdtmp = new JDialog(PropertyDialog.getParentDialog(this), "Information");
    else
      jdtmp = new JDialog(PropertyDialog.getParentFrame(this), "Information");
    final JDialog jd = jdtmp;
    jd.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        jd.dispose();
        if (m_HelpDialog == jd) {
          m_HelpBut.setEnabled(true);
        }
View Full Code Here


      }
    });

    configure.pack();

    configure.addWindowListener(new WindowAdapter() {
      public void windowDeactivated(WindowEvent e) {
        if(!form.isSearchFieldsSelectionDialogVisible()) {
          ((JDialog)e.getSource()).setVisible(false);
          mSearchFormSettings = form.getSearchFormSettings();
          saveSearchFormSettings();
View Full Code Here

 
  final JDialog jd =
    new JDialog(PropertyDialog.getParentFrame(ClassifierPanel.this), "Classifier evaluation options");
  jd.getContentPane().setLayout(new BorderLayout());
  jd.getContentPane().add(all, BorderLayout.CENTER);
  jd.addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent w) {
      jd.dispose();
      m_MoreOptions.setEnabled(true);
    }
  });
View Full Code Here

      //      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

   */
  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

        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

          }
        });     
    }
    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

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

          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

    public static String showPasswordDialog(Component parent, String title, int passFields, int icon)
    {
        final JPasswordField passwordField = new JPasswordField(passFields);
        JOptionPane pane = new JOptionPane(passwordField, icon, JOptionPane.OK_CANCEL_OPTION);
        JDialog dia = pane.createDialog(parent, title);
        dia.addWindowListener(new WindowAdapter()
        {
            @Override
            public void windowActivated(WindowEvent ev)
            {
                Timer timer = new Timer(50, new ActionListener()
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.