Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.IsWidget


*/
public class ModuleTemplatePresenterTest extends StubbedClientTestCase {

    /** Test replaceModuleBody(). */
    @Test public void testReplaceModuleBody() {
        IsWidget contents = mock(IsWidget.class);
        IsWidget viewWidget = mock(IsWidget.class);
        ConcreteModuleTemplatePresenter presenter = createPresenter();
        when(presenter.getView().getViewWidget()).thenReturn(viewWidget);
        presenter.onReplaceModuleBody(contents);
        verify(presenter.getView()).replaceModuleBody(contents);
        verify(presenter.getEventBus()).replaceRootBody(viewWidget);
View Full Code Here


*/
public class ModulePagePresenterTest extends StubbedClientTestCase {

    /** Test replaceModuleBody(). */
    @Test public void testReplaceModuleBody() {
        IsWidget viewWidget = mock(IsWidget.class);
        ConcreteModulePagePresenter presenter = createPresenter();
        when(presenter.getView().getViewWidget()).thenReturn(viewWidget);
        presenter.replaceModuleBody();
        verify(presenter.getEventBus()).replaceModuleBody(viewWidget);
    }
View Full Code Here

  /**
   * Hide the page currently displayed and call the associated lifecycle
   * methods.
   */
  private void hideCurrentPage() {
    IsWidget currentContent = navigatingContainer.getWidget();

    // Note: Optimized out in production mode
    if (currentPage != null &&
            (currentContent == null || currentWidget.asWidget() != currentContent)) {
      // This could happen if someone was manipulating the DOM behind our backs
View Full Code Here

                newRow(fact, field.getName());
            }

            // Sets row data
            int fieldRowIndex = rowIndexByFieldName.getRowIndex(field.getName());
            IsWidget editableCell = editableCell(
                    field,
                    fact,
                    fact.getType());
            widget.setWidget(fieldRowIndex,
                    col,
View Full Code Here

                newRow( fact, field.getName() );
            }

            // Sets row data
            int fieldRowIndex = rowIndexByFieldName.getRowIndex( field.getName() );
            IsWidget editableCell = editableCell(
                    field,
                    fact,
                    fact.getType() );
            widget.setWidget( fieldRowIndex,
                              col,
View Full Code Here

  /**
   * Hide the page currently displayed and call the associated lifecycle methods.
   */
  private void hideCurrentPage() {
    IsWidget currentContent = navigatingContainer.getWidget();

    // Note: Optimized out in production mode
    if (currentPage != null && (currentContent == null || currentWidget.asWidget() != currentContent)) {
      // This could happen if someone was manipulating the DOM behind our backs
      GWT.log("Current content widget vanished or changed. " + "Not delivering pageHiding event to " + currentPage
View Full Code Here

        verify(view).setPresenter(presenter);
    }

    @Test
    public void testSetWidget() throws Exception {
        IsWidget widget = mock(IsWidget.class);
        perspectivesPanel.setWidget(widget);

        verify(view).setWidget(widget);
    }
View Full Code Here

  /**
   * Hide the page currently displayed and call the associated lifecycle methods.
   */
  private void hideCurrentPage() {
    IsWidget currentContent = navigatingContainer.getWidget();

    // Note: Optimized out in production mode
    if (currentPage != null && (currentContent == null || currentWidget.asWidget() != currentContent)) {
      // This could happen if someone was manipulating the DOM behind our backs
      GWT.log("Current content widget vanished or changed. " + "Not delivering pageHiding event to " + currentPage
View Full Code Here

        verify( tabbedPanel, never() ).addTab( anyString(), Matchers.<IsWidget>any(), eq( newPlace ) );
    }

    private void verifyGoToNewPlace(Place place, String tabTitle) {
        ArgumentCaptor<AcceptTabItem> acceptTabItemArgumentCaptor = ArgumentCaptor.forClass( AcceptTabItem.class );
        IsWidget tabContentWidget = mock( IsWidget.class );

        Activity activity = goTo( place );

        verify( activity ).start( acceptTabItemArgumentCaptor.capture(), any( ResettableEventBus.class ) );
View Full Code Here

    @Test
    public void testTestAdd() throws Exception {
        NavigationPanelView view = mock(NavigationPanelView.class);
        NavigationPanel navigationPanel = new NavigationPanel(view);

        IsWidget header = mock(IsWidget.class);
        IsWidget content = mock(IsWidget.class);

        navigationPanel.add(header, content);

        verify(view).add(header, content);
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.IsWidget

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.