Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Event


        link.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
        link.setText(Messages.EnableSubBundlesDialog_link_text);
        link.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                getShell().notifyListeners(SWT.Help, new Event());
            }
        });

        propsTable = new Table(container, SWT.BORDER | SWT.CHECK | SWT.FULL_SELECTION);
        GridData gd_propsTable = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2);
View Full Code Here


                ActionContributionItem actionContributionItem = (ActionContributionItem) ti.getData();
                IAction action = actionContributionItem.getAction();
                if (action != DropDownAction.this) return;
               
                Event event = new Event();
                event.widget = ti;
                event.x = e.x;
                event.y = e.y;
                action.runWithEvent(event);
            }
View Full Code Here

    webUI.pageCreated( createWebPage( true ) );
    WebPage page = createWebPage( false );
    webUI.pageCreated( page );
    webUI.activate( page );

    webUI.getBackButton().notifyListeners( SWT.Selection, new Event() );

    verify( pageOperator ).closeCurrentPage();
  }
View Full Code Here

    when( ui.getPageOperator() ).thenReturn( pageOperator );
    webUI.setUi( ui );
    WebPage page = createWebPage( true );
    webUI.pageCreated( page );

    webUI.getPageSwitcherMenu().getItem( 0 ).notifyListeners( SWT.Selection, new Event() );

    verify( pageOperator ).openPage( "foo" );
  }
View Full Code Here

    verify( pageOperator ).openPage( "foo" );
  }

  @Test
  public void testPageSwitcherSelection_showsMenu() {
    webUI.getPageSwitcher().getItem( 0 ).notifyListeners( SWT.Selection, new Event() );

    assertTrue( webUI.getPageSwitcherMenu().getVisible() );
  }
View Full Code Here

    assertEquals( "foo", text.getMessage() );
  }

  @Test
  public void testControlSelectionEvent_activatesText() {
    control.notifyListeners( SWT.Selection, new Event() );

    assertTrue( text.getVisible() );
    assertTrue( text.isListening( SWT.Modify ) );
    assertFalse( ( ( RowData )text.getLayoutData() ).exclude );
    assertSame( text, display.getFocusControl() );
View Full Code Here

    assertSame( text, display.getFocusControl() );
  }

  @Test
  public void testControlSelectionEvent_callsActionExecute() {
    control.notifyListeners( SWT.Selection, new Event() );

    verify( searchAction ).execute( ui );
  }
View Full Code Here

  @Test
  public void testDoSearch_deactivatesText() {
    webSearchAction.open();

    text.notifyListeners( SWT.DefaultSelection, new Event() );

    assertFalse( text.getVisible() );
    assertFalse( text.isListening( SWT.Modify ) );
    assertTrue( ( ( RowData )text.getLayoutData() ).exclude );
  }
View Full Code Here

  @Test
  public void testDoSearch_callsActionSearch() {
    webSearchAction.open();
    text.setText( "foo" );

    text.notifyListeners( SWT.DefaultSelection, new Event() );

    verify( searchAction ).search( "foo" );
  }
View Full Code Here

    SearchActionListener listener = mock( SearchActionListener.class );
    mockUI( listener );
    webSearchAction.open();
    text.setText( "foo" );

    text.notifyListeners( SWT.DefaultSelection, new Event() );

    verify( listener ).searched( ui, searchAction, "foo" );
  }
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.