コード例 #1
0
 @Override
 public void eventDispatched(AWTEvent event) {
   if (event.getID() == WindowEvent.WINDOW_OPENED) {
     final WindowEvent we = (WindowEvent) event;
     for (JBPopup each : JBPopupFactory.getInstance().getChildPopups(this)) {
       if (each.getContent() != null
           && SwingUtilities.isDescendingFrom(each.getContent(), we.getWindow())) {
         super.setPopupVisible(false);
       }
     }
   }
 }
コード例 #2
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);
   }
 }
コード例 #3
0
  protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      status = CLOSED_OPTION;
      dispose();
    }

    super.processWindowEvent(e);
  }
コード例 #4
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);
   }
 }
コード例 #5
0
ファイル: JavaGame.java プロジェクト: ju57u5/JavaGame
 public void windowClosing(WindowEvent e) {
   if (online) {
     try {
       client.sendDisconnect();
     } catch (IOException e1) {
       e1.printStackTrace();
     }
   }
   e.getWindow().dispose(); // Fenster "killen"
   System.exit(0);
 }
コード例 #6
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);
   }
 }
コード例 #7
0
 public void windowClosing(WindowEvent e) {
   Window w = e.getWindow();
   w.setVisible(false);
 }
コード例 #8
0
    /**
     * 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();
    }
コード例 #9
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();
   }
 }
コード例 #10
0
 @Override
 public void windowLostFocus(WindowEvent e) {
   final Window window = e.getWindow();
   final Window oppositeWindow = e.getOppositeWindow();
 }
コード例 #11
0
 public void windowClosing(WindowEvent evt) {
   JFrame frame = (JFrame) evt.getSource();
   frame.setVisible(false);
   frame.dispose();
 }
コード例 #12
0
ファイル: TableDeneme.java プロジェクト: herlixjae/tubes1
 public void windowClosing(WindowEvent e) {
   Window w = e.getWindow();
   w.setVisible(false);
   w.dispose();
   System.exit(0);
 }
コード例 #13
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);
   }
 }
コード例 #14
0
 @Override
 public void windowClosing(WindowEvent e) {
   canvas.stop();
   e.getWindow().dispose();
 }
コード例 #15
0
 // Overridden so we can exit when window is closed
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     cancel();
   }
   super.processWindowEvent(e);
 }