Esempio n. 1
0
 public void windowClosing(WindowEvent e) {
   // e.getWindow().setVisible(false);
   (e.getWindow()).dispose();
   // System.exit(0);
   // (new Frame()).setVisible(false);
   // this.windowClosed(e);
 }
Esempio n. 2
0
    @Override
    public void windowClosing(WindowEvent e) {
      int n = JOptionPane.NO_OPTION;
      if (fileEdited) {
        n =
            JOptionPane.showConfirmDialog(
                view,
                "Il progetto "
                    + project.getTitle()
                    + " è stato modificato. Salvare il File prima di uscire?");
      }

      switch (n) {
        case JOptionPane.OK_OPTION:
          saveProject();
        case JOptionPane.NO_OPTION:
          try {
            comunication.close();
          } catch (IOException e1) {
            e1.printStackTrace();
          }
          view.trend.close();
          e.getWindow().dispose();
          System.exit(0);
          break;
        case JOptionPane.CANCEL_OPTION:
          break;
      }
    }
Esempio n. 3
0
 @Override
 public void windowActivated(WindowEvent event) {
   ResourceEditor editor = (ResourceEditor) event.getWindow();
   // dont double add, but also bump this one to the end
   if (mostRecentFocusedEditors.contains(editor)) mostRecentFocusedEditors.remove(editor);
   mostRecentFocusedEditors.add(editor);
   Application.this.notifyApplicationWindowActivated(event);
 }
Esempio n. 4
0
 /**
  * A window is closed (by the 'x') - create an SVET_DESTROY event. If it was the last open Window,
  * also send an SVET_EXIT event (but do not exit unless the client says so).
  */
 public void windowClosing(WindowEvent e) {
   processEvent(new SVEvent(SVEventType.SVET_DESTROY, svWindow, lastXMove, lastYMove, 0, 0, null));
   e.getWindow().dispose();
   SVWindow.nrWindows--;
   if (SVWindow.nrWindows == 0) {
     processEvent(new SVEvent(SVEventType.SVET_EXIT, svWindow, lastXMove, lastYMove, 0, 0, null));
   }
 }
Esempio n. 5
0
 public void windowClosing(WindowEvent e) {
   if (online) {
     try {
       client.sendDisconnect();
     } catch (IOException e1) {
       e1.printStackTrace();
     }
   }
   e.getWindow().dispose(); // Fenster "killen"
   System.exit(0);
 }
Esempio n. 6
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);
       }
     }
   }
 }
Esempio n. 7
0
 @Override
 public void windowClosing(WindowEvent e) {
   layout.remove((NotificationWindow) e.getWindow());
 }
Esempio n. 8
0
 public void windowClosing(WindowEvent e) {
   Window w = e.getWindow();
   w.setVisible(false);
 }
Esempio n. 9
0
 /**
  * A demonstration application showing how to create a simple time series chart. This example uses
  * monthly data.
  *
  * @param title the frame title.
  * @throws Exception
  */
 public void windowClosing(final WindowEvent evt) {
   if (evt.getWindow() == this) {
     dispose();
   }
 }
 @Override
 public void windowLostFocus(WindowEvent e) {
   final Window window = e.getWindow();
   final Window oppositeWindow = e.getOppositeWindow();
 }
Esempio n. 11
0
 public void windowClosing(WindowEvent e) {
   e.getWindow().dispose();
 }
 public void windowClosing(WindowEvent e) {
   Window w = e.getWindow();
   w.setVisible(false);
   w.dispose();
   System.exit(0);
 }
Esempio n. 13
0
 public void windowClosing(WindowEvent e) {
   Window w = e.getWindow();
   w.hide();
 }
Esempio n. 14
0
 @Override
 public void windowClosing(WindowEvent e) {
   canvas.stop();
   e.getWindow().dispose();
 }
Esempio n. 15
0
 public void windowClosing(WindowEvent e) {
   e.getWindow().setVisible(false);
   System.exit(0);
 } // windowClosing()
Esempio n. 16
0
 @Override
 public void windowClosing(WindowEvent e) {
   (e.getWindow()).dispose();
 }