Examples of AWTEvent


Examples of ae.java.awt.AWTEvent

            AppContext.stopEventDispatchThreads();
        }
    }

    static AWTEvent getShutdownEvent() {
        return new AWTEvent(getInstance(), 0) {};
    }
View Full Code Here

Examples of charva.awt.event.AWTEvent

  _eventQueue = eventQueue_;
    }

    public void run() {
  for (;;) {
      AWTEvent evt = _syncQueue.getNextEvent();
        // Sync thread exit point
        if(evt == null) break;
      try {
    sleep(50);
      }
View Full Code Here

Examples of java.awt.AWTEvent

    protected void fireActionPerformed()
    {
        if (m_actionListenersArray != null && !m_actionListenersArray.isEmpty())
        {
            AWTEvent event = EventQueue.getCurrentEvent();
            int modifier = 0;
            if (event instanceof InputEvent)
                modifier = ((InputEvent)event).getModifiers();
            else if (event instanceof ActionEvent)
                modifier = ((ActionEvent)event).getModifiers();
View Full Code Here

Examples of java.awt.AWTEvent

    void dispose() {
        if (this.frame != null) {
            MainFrame frame = this.frame;
            this.frame = null;
            AWTEvent e = new WindowEvent(frame, WindowEvent.WINDOW_CLOSING);
            Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(e);
        }
    }
View Full Code Here

Examples of java.awt.AWTEvent

    source.destroy();
  }

  @Test
  public void should_return_true_if_Window_closed() {
    AWTEvent event = new WindowEvent(source, WINDOW_CLOSED);
    assertThat(AWTEvents.wasWindowClosed(event)).isTrue();
  }
View Full Code Here

Examples of java.awt.AWTEvent

    assertThat(AWTEvents.wasWindowClosed(event)).isTrue();
  }

  @Test
  public void should_return_false_if_Window_not_closed() {
    AWTEvent event = new WindowEvent(source, WINDOW_CLOSING);
    assertThat(AWTEvents.wasWindowClosed(event)).isFalse();
  }
View Full Code Here

Examples of java.awt.AWTEvent

    source.destroy();
  }

  @Test
  public void should_return_true_if_Window_shown() {
    AWTEvent event = new ComponentEvent(source, COMPONENT_SHOWN);
    assertThat(AWTEvents.wasWindowShown(event)).isTrue();
  }
View Full Code Here

Examples of java.awt.AWTEvent

    assertThat(AWTEvents.wasWindowShown(event)).isTrue();
  }

  @Test
  public void should_return_false_if_Component_shown_is_not_Window() {
    AWTEvent event = new ComponentEvent(label().createNew(), COMPONENT_SHOWN);
    assertThat(AWTEvents.wasWindowShown(event)).isFalse();
  }
View Full Code Here

Examples of java.awt.AWTEvent

    assertThat(AWTEvents.wasWindowShown(event)).isFalse();
  }

  @Test
  public void should_return_false_if_Window_not_shown() {
    AWTEvent event = new ComponentEvent(source, COMPONENT_HIDDEN);
    assertThat(AWTEvents.wasWindowShown(event)).isFalse();
  }
View Full Code Here

Examples of java.awt.AWTEvent

  /** {@inheritDoc} */
  @RunsInEDT
  @Override
  public void eventDispatched(AWTEvent event) {
    AWTEvent e = checkNotNull(event);
    if (wasWindowOpened(e) || wasWindowShown(e)) {
      Window w = sourceOf(e);
      if (w != null) {
        filter(w);
      }
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.