Examples of WindowEvent


Examples of java.awt.event.WindowEvent

  /** {@inheritDoc} */
  @RunsInEDT
  @Override
  public void close(@Nonnull Window w) {
    WindowEvent event = new WindowEvent(w, WINDOW_CLOSING);
    // If the window contains an applet, send the event on the applet's queue instead to ensure a shutdown from the
    // applet's context (assists AppletViewer cleanup).
    Component applet = findAppletDescendent(w);
    EventQueue eventQueue = windowMonitor.eventQueueFor(applet != null ? applet : w);
    checkNotNull(eventQueue).postEvent(event);
View Full Code Here

Examples of java.awt.event.WindowEvent

public class TransientWindowListener_eventDispatched_Test extends TransientWindowListener_eventDispatched_TestCase {
  private WindowEvent event;

  @Override
  void onSetUp() {
    event = new WindowEvent(eventSource, WINDOW_CLOSED);
  }
View Full Code Here

Examples of java.awt.event.WindowEvent

    listener.eventDispatched(event());
    verify(windowFilter).ignore(eventSource);
  }

  private AWTEvent event() {
    return eventId == WINDOW_OPENED ? new WindowEvent(eventSource, eventId) : new ComponentEvent(eventSource, eventId);
  }
View Full Code Here

Examples of java.awt.event.WindowEvent

    public void handleEvent (Event e) {
      switch (e.type) {
        case SWT.Deiconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEICONIFIED));
            }
          });
          break;
        case SWT.Iconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ICONIFIED));
            }
          });
          break;
      }
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

    }

    public void setActive(boolean focus)
    {
        if (active == true && focus == false)
            dispatchEvent(new WindowEvent(GUIManager.getInstance(),
                    WindowEvent.WINDOW_DEACTIVATED));

        active = focus;
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

    /**
     * Fire a WindowEvent with a given id to the awtComponent.
     */
    private final void fireWindowEvent(int id) {
        JNodeToolkit.postToTarget(new WindowEvent(targetComponent, id), targetComponent);
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

        menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
        menuItem.addActionListener(new AbstractAction() {
      private static final long serialVersionUID = 1L;
            public void actionPerformed(ActionEvent event) {
              JFrame frame = XBayaMenuItem.this.engine.getGUI().getFrame();
        frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
            }
        });
        return menuItem;
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

                    } catch (InvocationTargetException e) {
                        handleSynthesizeException(e);
                    }
                } else {
                    if (activate) {
                        frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                        frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_GAINED_FOCUS));
                    } else {
                        frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_LOST_FOCUS));
                        frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
                    }
                }
            }
        });
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

    public void handleEvent (Event e) {
      switch (e.type) {
        case SWT.Deiconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEICONIFIED));
            }
          });
          break;
        case SWT.Iconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ICONIFIED));
            }
          });
          break;
      }
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

              "Closing existing Evaluation Demo",
              JOptionPane.OK_CANCEL_OPTION,
              JOptionPane.WARNING_MESSAGE) != 0) {
        return false;
      }
      this.operatorGraphViewer.processWindowEvent(new WindowEvent(
          this.operatorGraphViewer, WindowEvent.WINDOW_CLOSING));
    }
//    if (Indices.operatorGraphViewer != null
//        && Indices.operatorGraphViewer.isVisible()) {
//      if (JOptionPane
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.