Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Event


    d.setRunning(true);

    Thread.sleep((idleInterval + runDelay) * 2);
    assertThat(d.isUserActive(), is(false));

    shell.notifyListeners(SWT.KeyDown, new Event());
    assertThat(d.isUserActive(), is(true));
  }
View Full Code Here


    Thread.sleep(idleInterval + (runDelay * 2));
    Thread.sleep(idleInterval + (runDelay * 2));
    assertFalse(d.isUserActive());

    shell.notifyListeners(SWT.KeyDown, new Event());
    shell.notifyListeners(SWT.KeyDown, new Event());

    assertEquals(1, ob.inactiveCount);
    assertEquals(1, ob.activeCount);
  }
View Full Code Here

    d.setRunning(true);

    Thread.sleep(idleInterval + (runDelay * 2));
    assertFalse(d.isUserActive());

    shell.notifyListeners(SWT.MouseDown, new Event());
    assertTrue(d.isUserActive());
  }
View Full Code Here

    Thread.sleep(idleInterval + (runDelay * 2));
    Thread.sleep(idleInterval + (runDelay * 2));
    assertFalse(d.isUserActive());

    shell.notifyListeners(SWT.MouseDown, new Event());
    shell.notifyListeners(SWT.MouseDown, new Event());
    shell.notifyListeners(SWT.MouseDown, new Event());

    assertEquals(1, ob.inactiveCount);
    assertEquals(1, ob.activeCount);
  }
View Full Code Here

    d.addObserver(ob);
    d.setRunning(true);

    Thread.sleep(idleInterval / 2);
    assertTrue(d.isUserActive());
    shell.notifyListeners(SWT.MouseDown, new Event());

    Thread.sleep(idleInterval / 2);
    assertTrue(d.isUserActive());
    shell.notifyListeners(SWT.MouseDown, new Event());

    Thread.sleep(idleInterval / 2);
    assertTrue(d.isUserActive());
    shell.notifyListeners(SWT.MouseDown, new Event());

    assertEquals(0, ob.inactiveCount);
    assertEquals(0, ob.activeCount);
  }
View Full Code Here

    d.setRunning(false);

    Thread.sleep(idleInterval + (runDelay * 2));
    Thread.sleep(idleInterval + (runDelay * 2));

    shell.notifyListeners(SWT.KeyDown, new Event());
    shell.notifyListeners(SWT.MouseDown, new Event());

    assertEquals(0, ob.inactiveCount);
    assertEquals(0, ob.activeCount);
  }
View Full Code Here

    /*
     * Test method for 'org.locationtech.udig.project.ui.internal.render.displayAdapter.impl.EventHandler.mouseDoubleClick(Event)'
     */
    @Test
    public void testMouseDoubleClick() {
        Event e=new Event();
        e.button=1;
        e.stateMask=SWT.ALT;
        handler.mouseDoubleClick(e);
        MapMouseEvent event=(MapMouseEvent) eventJob.event;
        assertEquals(MapMouseEvent.ALT_DOWN_MASK, event.modifiers);
View Full Code Here

    /*
     * Test method for 'org.locationtech.udig.project.ui.internal.render.displayAdapter.impl.EventHandler.mouseDown(Event)'
     */
    @Test
    public void testMouseDown() {
        Event e=new Event();
        e.button=1;
        e.stateMask=SWT.ALT|SWT.BUTTON1;

        handler.mouseDown(e);
        MapMouseEvent event=(MapMouseEvent) eventJob.event;
View Full Code Here

    /*
     * Test method for 'org.locationtech.udig.project.ui.internal.render.displayAdapter.impl.EventHandler.mouseUp(Event)'
     */
    @Test
    public void testMouseUp() {
        Event e=new Event();
        e.button=1;
        e.stateMask=SWT.ALT|SWT.BUTTON1;

        handler.mouseDown(e);
        e.button=2;
View Full Code Here

    } else {
      // If there is no working update job, or the update job is ready to
      // accept selections, set the selection immediately.
      if (fUpdateJob == null) {
        fList.setSelection(selection);
        fList.notifyListeners(SWT.Selection, new Event());
      } else {
        // There is an update job doing the population of the list, so
        // it should update the selection.
        fUpdateJob.updateSelection(selection);
      }
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.