Beispiel #1
0
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     abortAction.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ""));
   } else if (e.getID() == WindowEvent.WINDOW_CLOSED) {
     close();
   }
 }
Beispiel #2
0
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   int defaultCloseOperation = getDefaultCloseOperation();
   if ((e.getID() == WindowEvent.WINDOW_CLOSING) && (defaultCloseOperation == EXIT_ON_CLOSE)) {
     System.exit(returnCode);
   }
 }
 @Override
 // 设置窗口显示模式
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     switch (getDefaultCloseOperation()) {
       case HIDE_ON_CLOSE:
         setVisible(false);
         MainFrame.getMainFrame().cancelShowNear();
         MainFrame.getMainFrame().cancelShowFocusNearPoint();
         break;
       case DISPOSE_ON_CLOSE:
         dispose();
         break;
       case DO_NOTHING_ON_CLOSE:
       default:
         break;
       case EXIT_ON_CLOSE:
         // This needs to match the checkExit call in
         // setDefaultCloseOperation
         System.exit(0);
         break;
     }
   }
 }
 @Override
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     client.shutdown();
   }
   super.processWindowEvent(e);
 }
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     try {
       FocusManager fm = FocusManager.getCurrentManager();
       if (fm != null) {
         Component cmp = fm.getFocusOwner();
         if (cmp != null) {
           // フォーカスロスト前に×ボタンで閉じる場合を想定し、擬似的にFocusLostを発行する
           cmp.dispatchEvent(new FocusEvent(cmp, FocusEvent.FOCUS_LOST));
         }
       }
       if (canClose()) {
         // パラメータを渡し用HashMapに格納する
         paramas.put("ACT", "close");
         paramas.put("INSURER_NM", "");
         paramas.put("INSURER_NO", "");
         paramas.put("JIGYOUSHA_NO", "");
         closeWindow();
       } else {
         return;
       }
     } catch (Exception ex) {
       ex.printStackTrace();
     }
     super.processWindowEvent(e);
     closeWindow();
   }
   super.processWindowEvent(e);
 }
 /* (non-Javadoc)
  * @see java.awt.Window#processWindowEvent(java.awt.event.WindowEvent)
  */
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     // Fenster schliessen.
     this.setVisible(false);
     this.dispose();
   }
 }
 /** Window closing */
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     if (_responseTableModel != null) {
       _responseTableModel.cleanup();
     }
     dispose();
   }
 }
Beispiel #8
0
 @Override
 /** Closing the application */
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     System.exit(0);
   }
 }
  protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      status = CLOSED_OPTION;
      dispose();
    }

    super.processWindowEvent(e);
  }
    protected void processWindowEvent(java.awt.event.WindowEvent e) {
      super.processWindowEvent(e);

      if (e.getID() != java.awt.event.WindowEvent.WINDOW_OPENED)
        //noinspection UnnecessaryReturnStatement
        return;
      GLFrame glFrame = new GLFrame(outputArea);
      glFrame.setVisible(true);
    }
 /** Handle dialog closing event. */
 protected void processWindowEvent(WindowEvent e) {
   int id = e.getID();
   if (id == WindowEvent.WINDOW_CLOSING) {
     selectedDir = null;
     dispose();
   } else {
     super.processWindowEvent(e);
   }
 }
  /**
   * Window Events - requestFocus
   *
   * @param e
   */
  @Override
  protected void processWindowEvent(final WindowEvent e) {
    super.processWindowEvent(e);

    //
    // When window is opened, focus on initial answer button
    if (e.getID() == WindowEvent.WINDOW_OPENED) {
      focusInitialAnswerButton();
    }
  } // processWindowEvent
  protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      /*
       * 关闭当前窗体 如果省略此句,那么就禁用了关闭按钮
       */

      this.dispose();
    } else {
      super.processWindowEvent(e);
    }
  }
 @Override
 protected void processWindowEvent(final WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     if (!plugin) {
       dispose();
       System.exit(0);
     } else {
       saveWindowState();
       setVisible(false);
     }
   } else {
     super.processWindowEvent(e);
   }
 }
Beispiel #15
0
  /**
   * Descripción de Método
   *
   * @param e
   */
  public void windowStateChanged(WindowEvent e) {

    // The Customize Window was closed

    if ((e.getID() == WindowEvent.WINDOW_CLOSED) && (m_reportEngine != null)) {
      setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      log.info("Re-read PrintFormat");

      int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().getID();
      Language language = m_reportEngine.getPrintFormat().getLanguage();
      MPrintFormat pf = MPrintFormat.get(Env.getCtx(), AD_PrintFormat_ID, true);

      pf.setLanguage(language); // needs to be re-set - otherwise viewer will be blank
      pf.setTranslationLanguage(language);
      m_reportEngine.setPrintFormat(pf);
      revalidate();
      cmd_drill(); // setCursor
    }
  } // windowStateChanged
Beispiel #16
0
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     cancel();
   }
   super.processWindowEvent(e);
 }
Beispiel #17
0
 public void processWindowEvent(WindowEvent event) {
   if (event.getID() == WindowEvent.WINDOW_CLOSING) System.exit(0);
 }
 /** Window closing */
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     dispose();
   }
 }
Beispiel #19
0
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     if (panel.closeFile()) System.exit(0);
   } else super.processWindowEvent(e);
 }
    /**
     * Repacks the window each time it is displayed to adjust size to fit wording and buttons.
     *
     * @param e event.
     */
    protected void processWindowEvent(WindowEvent e) {
      super.processWindowEvent(e);

      if (e.getID() == WindowEvent.WINDOW_OPENED) pack();
    }
Beispiel #21
0
 protected void processWindowEvent(WindowEvent we) {
   if (we.getID() == we.WINDOW_CLOSING) {
     r = JOptionPane.showConfirmDialog(null, "WARNNING", "EXIT", JOptionPane.WARNING_MESSAGE);
     if (r == JOptionPane.YES_OPTION) dispose();
   }
 }
 /** Overridden so we can exit when window is closed */
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     System.exit(0);
   }
 }
 /**
  * Called when the main JMeter frame is being closed. Sends a notification so that JMeter can
  * react appropriately.
  *
  * @param event the WindowEvent to handle
  */
 @Override
 public void windowClosing(WindowEvent event) {
   ReportActionRouter.getInstance()
       .actionPerformed(new ActionEvent(this, event.getID(), "exit"));
 }
Beispiel #24
0
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   if (e.getID() == 201) {
     jMenuFileExit_actionPerformed(null);
   }
 }