コード例 #1
0
 @Override
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     client.shutdown();
   }
   super.processWindowEvent(e);
 }
コード例 #2
0
 @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;
     }
   }
 }
コード例 #3
0
ファイル: ExitableJFrame.java プロジェクト: fjammes/sto-koh
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   int defaultCloseOperation = getDefaultCloseOperation();
   if ((e.getID() == WindowEvent.WINDOW_CLOSING) && (defaultCloseOperation == EXIT_ON_CLOSE)) {
     System.exit(returnCode);
   }
 }
コード例 #4
0
 /* (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();
   }
 }
コード例 #5
0
ファイル: FrameModules.java プロジェクト: RubelAhmed57/KEEL
 @Override
 /** Closing the application */
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     System.exit(0);
   }
 }
コード例 #6
0
    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);
    }
  protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      /*
       * 关闭当前窗体 如果省略此句,那么就禁用了关闭按钮
       */

      this.dispose();
    } else {
      super.processWindowEvent(e);
    }
  }
コード例 #8
0
 @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);
   }
 }
コード例 #9
0
ファイル: TherapySK.java プロジェクト: rakama/TherapySK
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     if (panel.closeFile()) System.exit(0);
   } else super.processWindowEvent(e);
 }
コード例 #10
0
ファイル: Pantalla.java プロジェクト: djjatoro/ProyectoDI
 protected void processWindowEvent(WindowEvent e) {
   super.processWindowEvent(e);
   if (e.getID() == 201) {
     jMenuFileExit_actionPerformed(null);
   }
 }
コード例 #11
0
 /** 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);
   }
 }