Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Event


      public void run() {
        Table table = quickFixTable.widget;
        log.debug(MessageFormat.format("Selecting row [{0}] {1} in {2}", quickFixIndex, table.getItem(quickFixIndex).getText(), //$NON-NLS-1$
            table));
        table.setSelection(quickFixIndex);
        Event event = new Event();
        event.type = SWT.Selection;
        event.widget = table;
        event.item = table.getItem(quickFixIndex);
        table.notifyListeners(SWT.Selection, event);
        table.notifyListeners(SWT.DefaultSelection, event);
View Full Code Here


   * Gets the arrow event.
   *
   * @return The event.
   */
  private Event arrowEvent() {
    Event event = createEvent();
    event.detail = SWT.ARROW;
    return event;
  }
View Full Code Here

   *
   * @return an event that encapsulates {@link #widget} and {@link #display}. Subclasses may override to set other
   *         event properties.
   */
  protected Event createEvent() {
    Event event = new Event();
    event.time = (int) System.currentTimeMillis();
    event.widget = widget;
    event.display = display;
    return event;
  }
View Full Code Here

   * @param count the number of times the mouse was clicked.
   * @return an event that encapsulates {@link #widget} and {@link #display}
   * @since 1.2
   */
  protected Event createMouseEvent(int x, int y, int button, int stateMask, int count) {
    Event event = new Event();
    event.time = (int) System.currentTimeMillis();
    event.widget = widget;
    event.display = display;
    event.x = x;
    event.y = y;
View Full Code Here

   * @param keyCode the key code of the key pressed
   * @param character the character representation of the key
   * @return an event that encapsulates {@link #widget} and {@link #display}
   */
  private Event createKeyEvent(int keyCode, char character) {
    Event event = createEvent();
    event.keyCode = keyCode;
    event.character = character;
    return event;
  }
View Full Code Here

   * @param y the y coordinate
   */
  void moveMouse(final int x, final int y) {
    asyncExec(new VoidResult() {
      public void run() {
        Event event = createMouseEvent(x, y, 0, 0, 0);
        event.type = SWT.MouseMove;
        display.post(event);
      }
    });
  }
View Full Code Here

   * @param button the mouse button to be pressed
   */
  private void mouseDown(final int x, final int y, final int button) {
    asyncExec(new VoidResult() {
      public void run() {
        Event event = createMouseEvent(x, y, button, 0, 0);
        event.type = SWT.MouseDown;
        display.post(event);
      }
    });
  }
View Full Code Here

   * @param button the mouse button to be pressed
   */
  private void mouseUp(final int x, final int y, final int button) {
    asyncExec(new VoidResult() {
      public void run() {
        Event event = createMouseEvent(x, y, button, 0, 0);
        event.type = SWT.MouseUp;
        display.post(event);
      }
    });
  }
View Full Code Here

   * @see Event#character
   * @see Event#stateMask
   * @since 1.2
   */
  protected Event keyEvent(int modificationKey, char c, int keyCode) {
    Event keyEvent = createEvent();
    keyEvent.stateMask = modificationKey;
    keyEvent.character = c;
    keyEvent.keyCode = keyCode;

    return keyEvent;
View Full Code Here

   * Creates an event for CheckboxTableItem case.
   *
   * @return an event that encapsulates {@link #widget} and {@link #display}.
   */
  private Event createCheckEvent() {
    Event event = createEvent();
    event.detail = SWT.CHECK;
    return event;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Event

Copyright © 2018 www.massapicom. 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.