当前位置: 首页>>代码示例>>Java>>正文


Java IsWidget类代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.IsWidget的典型用法代码示例。如果您正苦于以下问题:Java IsWidget类的具体用法?Java IsWidget怎么用?Java IsWidget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IsWidget类属于com.google.gwt.user.client.ui包,在下文中一共展示了IsWidget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TouchReservationHandler

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Inject
public TouchReservationHandler(@Assisted IsWidget widget, final EventsBus eventsBus) {
    handlerRegistration = widget.asWidget().addDomHandler(new TouchStartHandler() {

        @Override
        public void onTouchStart(TouchStartEvent event) {
            eventsBus.fireEvent(new PlayerEvent(PlayerEventTypes.TOUCH_EVENT_RESERVATION));

        }
    }, TouchStartEvent.getType());
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:12,代码来源:TouchReservationHandler.java

示例2: before

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Before
public void before() {
    view = mock(IsWidget.class);
    Widget widget = cretateWidgetAndElementMock();
    doReturn(widget).when(view).asWidget();

    connectionStyleChecker = mock(ConnectionStyleChecker.class);
    instance = new ConnectionStyleCheckerHandler(view, connectionStyleChecker);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:10,代码来源:ConnectionStyleCheckerHandlerJUnitTest.java

示例3: testSetValueUsingFileUrl

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Test
public void testSetValueUsingFileUrl() {
    final CSVDataSetDef dataSetDef = mock(CSVDataSetDef.class);
    when(dataSetDef.getUUID()).thenReturn("uuid1");
    when(dataSetDef.getName()).thenReturn("name1");
    when(dataSetDef.getProvider()).thenReturn(DataSetProviderType.CSV);
    when(dataSetDef.getFileURL()).thenReturn("fileUrl");
    when(dataSetDef.getFilePath()).thenReturn(null);
    presenter.setValue(dataSetDef);
    assertEquals(false, presenter.isUsingFilePath());
    verify(view, times(0)).init(presenter);
    verify(view, times(0)).initWidgets(any(ValueBoxEditor.View.class), any(IsWidget.class),any(ValueBoxEditor.View.class),
            any(ValueBoxEditor.View.class), any(ValueBoxEditor.View.class), any(ValueBoxEditor.View.class), any(ValueBoxEditor.View.class));
    verify(view, times(1)).showFileURLInput();
    verify(view, times(0)).showFilePathInput();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:CSVDataSetDefAttributesEditorTest.java

示例4: setup

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Before
public void setup() throws Exception {
    MockitoAnnotations.initMocks(this);
    IsWidget attributesEditor = mock(IsWidget.class);
    
    presenter = new DataSetEditor<DataSetDef>(basicAttributesEditor, attributesEditor, columnsAndFilterEditor,
            previewTable, backendCacheAttributesEditor, clientCacheAttributesEditor, refreshEditor, clientServices,
            loadingBox, errorEvent, tabChangedEvent, view) {
        @Override
        public void init() {
            super.init();
        }
    };
    
    when(dataSetDef.getUUID()).thenReturn("uuid1");
    when(dataSetDef.getName()).thenReturn("name1");
    when(dataSetDef.getProvider()).thenReturn(DataSetProviderType.BEAN);
    when(columnsAndFilterEditor.dataSetFilter()).thenReturn(filterEditor);
    when(columnsAndFilterEditor.columnListEditor()).thenReturn(columnsEditor);
    when(columnsEditor.columns()).thenReturn(columnListEditor);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:22,代码来源:DataSetEditorTest.java

示例5: testShow

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Test
public void testShow() {
    final String name = "group1";
    tested.show(name);
    verify(view,
           times(1)).setCancelButtonVisible(false);
    verify(view,
           times(1)).setCallback(any(EntityWorkflowView.Callback.class));
    verify(view,
           times(1)).setSaveButtonText(anyString());
    verify(view,
           times(1)).setWidget(any(IsWidget.class));
    verify(view,
           times(1)).setSaveButtonVisible(false);
    verify(view,
           times(1)).setSaveButtonEnabled(false);
    verify(view,
           times(0)).showNotification(anyString());
    verify(view,
           times(1)).clearNotifications();
    verify(groupEditorDriver,
           times(1)).edit(group,
                          groupEditor);
    verify(groupEditor,
           times(1)).clear();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:27,代码来源:GroupEditorWorkflowTest.java

示例6: onChangeTitleWidgetEvent

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@SuppressWarnings("unused")
private void onChangeTitleWidgetEvent(@Observes ChangeTitleWidgetEvent event) {
    final PlaceRequest place = event.getPlaceRequest();
    final IsWidget titleDecoration = event.getTitleDecoration();
    final String title = event.getTitle();
    for (Map.Entry<PanelDefinition, WorkbenchPanelPresenter> e : mapPanelDefinitionToPresenter.entrySet()) {
        final PanelDefinition panel = e.getKey();
        final WorkbenchPanelPresenter presenter = e.getValue();
        for (PartDefinition part : ensureIterable(panel.getParts())) {
            if (place.equals(part.getPlace())) {
                mapPartDefinitionToPresenter.get(part).setTitle(title);
                presenter.changeTitle(part,
                                      title,
                                      titleDecoration);
                break;
            }
        }
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:PanelManagerImpl.java

示例7: testSetValueEnabled

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Test
public void testSetValueEnabled() {
    final DataSetDef dataSetDef = mock(DataSetDef.class);
    when(dataSetDef.getUUID()).thenReturn("uuid1");
    when(dataSetDef.getName()).thenReturn("name1");
    when(dataSetDef.getProvider()).thenReturn(DataSetProviderType.SQL);
    when(dataSetDef.getRefreshTime()).thenReturn("1 second");
    presenter.setValue(dataSetDef);
    assertEquals(true, presenter.isRefreshEnabled());
    verify(refreshTime, times(1)).setEnabled(true);
    verify(refreshAlways, times(1)).setEnabled(true);
    verify(view, times(1)).setEnabled(true);
    verify(view, times(0)).init(presenter);
    verify(view, times(0)).initWidgets(any(IsWidget.class), any(DataSetDefRefreshIntervalEditor.View.class));
    verify(view, times(0)).addRefreshEnabledButtonHandler(any(Command.class));
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:DataSetDefRefreshAttributesEditorTest.java

示例8: selectTab

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void selectTab(@NotNull PartPresenter partPresenter) {
  IsWidget view = partPresenter.getView();
  int viewIndex = partStackContent.getWidgetIndex(view);

  boolean isWidgetExist = viewIndex != -1;

  if (!isWidgetExist) {
    partPresenter.go(partViewContainer);

    viewIndex = partStackContent.getWidgetIndex(view);
  }

  partStackContent.showWidget(viewIndex);

  setActiveTab(partPresenter);
}
 
开发者ID:eclipse,项目名称:che,代码行数:19,代码来源:PartStackViewImpl.java

示例9: split

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Override
public void split(IsWidget replicaWidget, Direction direction, double size) {
  this.direction = direction;
  splitLayoutPanel = new SplitLayoutPanel(SPLITTER_SIZE);
  specimenView = new SplitEditorPartViewImpl(specimenWidget, this);
  replicaView = new SplitEditorPartViewImpl(replicaWidget, this);

  if (direction == VERTICALLY) {
    splitVertically(size);
  } else if (direction == HORIZONTALLY) {
    splitHorizontally(size);
  }

  splitLayoutPanel.add(replicaView);
  rootPanel.remove(specimenWidget);
  rootPanel.add(splitLayoutPanel);

  tuneSplitter(splitLayoutPanel);
}
 
开发者ID:eclipse,项目名称:che,代码行数:20,代码来源:SplitEditorPartViewImpl.java

示例10: testSetDirtyFalse

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Test
public void testSetDirtyFalse() {
    tested.setDirty(false);
    verify(view,
           times(0)).setCancelButtonVisible(anyBoolean());
    verify(view,
           times(0)).setCallback(any(EntityWorkflowView.Callback.class));
    verify(view,
           times(0)).setSaveButtonText(anyString());
    verify(view,
           times(0)).setWidget(any(IsWidget.class));
    verify(view,
           times(0)).setSaveButtonVisible(anyBoolean());
    verify(view,
           times(1)).setSaveButtonEnabled(false);
    verify(view,
           times(0)).showNotification(anyString());
    verify(view,
           times(1)).clearNotifications();
    verify(loadingBox,
           times(0)).show();
    verify(loadingBox,
           times(0)).hide();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:BaseUserEditorWorkflowTest.java

示例11: testOnTabChangedEvent_ConfigurationTab

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Test
public void testOnTabChangedEvent_ConfigurationTab() {
    when(editWorkflow.getEditor()).thenReturn(dataSetDefEditor);
    TabChangedEvent event = mock(TabChangedEvent.class);
    when(event.getContext()).thenReturn(dataSetDefEditor);
    when(event.getTabId()).thenReturn(DataSetEditor.TAB_CONFIGURATION);
    presenter.currentWorkflow = editWorkflow;
    presenter.onTabChangedEvent(event);
    verify(editWorkflow, times(1)).clearButtons();
    verify(editWorkflow, times(1)).showTestButton();
    verify(editWorkflow, times(0)).showNextButton();
    verify(editWorkflow, times(0)).showBackButton();
    verify(editWorkflow, times(0)).edit(any(SQLDataSetDef.class), any(List.class));
    verify(errorPopupPresenter, times(0)).showMessage(anyString());
    verify(view, times(0)).setWidget(any(IsWidget.class));
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:DataSetDefWizardScreenTest.java

示例12: generateComponents

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
private void generateComponents(LayoutTemplate layoutTemplate,
                                final LayoutInstance layoutInstance,
                                final LayoutColumn layoutColumn,
                                final HTMLElement column) {
    for (final LayoutComponent layoutComponent : layoutColumn.getLayoutComponents()) {
        final LayoutDragComponent dragComponent = lookupLayoutDragComponent(layoutComponent);
        if (dragComponent != null) {
            Widget columnWidget = ElementWrapperWidget.getWidget(column);
            RenderingContext componentContext = new RenderingContext(layoutComponent, columnWidget);
            IsWidget componentWidget = dragComponent.getShowWidget(componentContext);

            if (layoutTemplate.isPageStyle() && layoutColumn.getHeight().isEmpty()) {
                componentWidget.asWidget().getElement().addClassName("uf-perspective-col");
            }
            else if (!layoutColumn.getHeight().isEmpty()) {
                column.getClassList().add("uf-perspective-row-" + layoutColumn.getHeight());
            }
            if (componentWidget != null) {
                DOMUtil.appendWidgetToElement(column, componentWidget);
            }
        }
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:AbstractLayoutGenerator.java

示例13: testClear

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@Test
public void testClear() {
    tested.role = role;
    tested.clear();
    assertNull(tested.role);
    verify(roleEditor).clear();
    verify(roleEditor,
           never()).show(any(Role.class));
    verify(view,
           atLeastOnce()).clearNotifications();
    verify(view,
           never()).setCancelButtonVisible(true);
    verify(view,
           never()).setCallback(any(EntityWorkflowView.Callback.class));
    verify(view,
           never()).setSaveButtonText(anyString());
    verify(view,
           never()).setWidget(any(IsWidget.class));
    verify(view,
           never()).setSaveButtonVisible(anyBoolean());
    verify(view,
           never()).setSaveButtonEnabled(anyBoolean());
    verify(view,
           never()).showNotification(anyString());
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:26,代码来源:RoleEditorWorkflowTest.java

示例14: MessageDialogPresenter

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@AssistedInject
public MessageDialogPresenter(
    @NotNull MessageDialogView view,
    @NotNull @Assisted("title") String title,
    @NotNull @Assisted IsWidget content,
    @Nullable @Assisted ConfirmCallback confirmCallback,
    @Nullable @Assisted("confirmButtonText") String confirmButtonText) {
  this.view = view;
  this.view.setContent(content);
  this.view.setTitle(title);
  this.confirmCallback = confirmCallback;
  this.view.setDelegate(this);

  if (content.asWidget() != null) {
    content.asWidget().ensureDebugId("info-window-message");
  }

  if (confirmButtonText != null) {
    view.setConfirmButtonText(confirmButtonText);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:22,代码来源:MessageDialogPresenter.java

示例15: ChoiceDialogPresenter

import com.google.gwt.user.client.ui.IsWidget; //导入依赖的package包/类
@AssistedInject
public ChoiceDialogPresenter(
    final @NotNull ChoiceDialogView view,
    final @NotNull @Assisted String title,
    final @NotNull @Assisted IsWidget content,
    final @NotNull @Assisted("firstChoice") String firstChoiceLabel,
    final @NotNull @Assisted("secondChoice") String secondChoiceLabel,
    final @NotNull @Assisted("thirdChoice") String thirdChoiceLabel,
    final @Nullable @Assisted("firstCallback") ConfirmCallback firstChoiceCallback,
    final @Nullable @Assisted("secondCallback") ConfirmCallback secondChoiceCallback,
    final @Nullable @Assisted("thirdCallback") ConfirmCallback thirdChoiceCallback) {
  this.view = view;
  this.view.setContent(content);
  this.view.setTitle(title);
  this.view.setFirstChoiceLabel(firstChoiceLabel);
  this.view.setSecondChoiceLabel(secondChoiceLabel);
  this.view.setThirdChoiceLabel(thirdChoiceLabel);
  this.firstChoiceCallback = firstChoiceCallback;
  this.secondChoiceCallback = secondChoiceCallback;
  this.thirdChoiceCallback = thirdChoiceCallback;
  this.view.setDelegate(this);
}
 
开发者ID:eclipse,项目名称:che,代码行数:23,代码来源:ChoiceDialogPresenter.java


注:本文中的com.google.gwt.user.client.ui.IsWidget类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。