Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Shell.traverse()


  public void portsTextTraversesOnTab() throws Exception {
    KeyEvent e = initPortsTextListener();
    e.keyCode = SWT.TAB;
    Shell shell = mock(Shell.class);
    when(((Control)e.getSource()).getShell()).thenReturn(shell);
    when(shell.traverse(SWT.TRAVERSE_TAB_NEXT)).thenReturn(true);

    portsTextListener.keyPressed(e);
    assertFalse(e.doit);
  }
 
View Full Code Here


  public void portsTextTraversesOnEnter() throws Exception {
    KeyEvent e = initPortsTextListener();
    e.keyCode = SWT.CR;
    Shell shell = mock(Shell.class);
    when(((Control)e.getSource()).getShell()).thenReturn(shell);
    when(shell.traverse(SWT.TRAVERSE_RETURN)).thenReturn(true);

    portsTextListener.keyPressed(e);
    assertFalse(e.doit);
  }
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.