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


Java Button.ensureDebugId方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.Button.ensureDebugId方法的典型用法代码示例。如果您正苦于以下问题:Java Button.ensureDebugId方法的具体用法?Java Button.ensureDebugId怎么用?Java Button.ensureDebugId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.Button的用法示例。


在下文中一共展示了Button.ensureDebugId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createButton

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
protected Button createButton(
    String title, String debugId, ClickHandler clickHandler, ButtonAlignment alignment) {
  Button button = new Button();
  button.setText(title);
  button.ensureDebugId(debugId);
  button.getElement().setId(debugId);
  button.addStyleName(resources.windowCss().button());
  addButtonAlignment(button, alignment);
  button.addClickHandler(clickHandler);
  // set default tab index
  button.setTabIndex(0);
  return button;
}
 
开发者ID:eclipse,项目名称:che,代码行数:14,代码来源:Window.java

示例2: CreateFactoryViewImpl

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
@Inject
protected CreateFactoryViewImpl(
    FactoryViewImplUiBinder uiBinder,
    CoreLocalizationConstant locale,
    FactoryResources factoryResources,
    ClipboardButtonBuilder buttonBuilder) {
  this.factoryResources = factoryResources;
  setTitle(locale.createFactoryTitle());
  setWidget(uiBinder.createAndBindUi(this));
  factoryNameLabel.setText(locale.createFactoryName());
  factoryLinkLabel.setText(locale.createFactoryLink());
  configure.getElement().insertFirst(factoryResources.configure().getSvg().getElement());
  launch.getElement().insertFirst(factoryResources.execute().getSvg().getElement());
  launch.addStyleName(style.launchIcon());
  configure.addStyleName(style.configureIcon());
  createFactoryButton.setEnabled(false);
  Button cancelButton =
      createButton(
          locale.createFactoryButtonClose(),
          "git-remotes-pull-cancel",
          event -> delegate.onCancelClicked());
  createFactoryButton.addClickHandler(clickEvent -> delegate.onCreateClicked());
  cancelButton.ensureDebugId("projectReadOnlyGitUrl-btnClose");
  addButtonToFooter(cancelButton);
  getWidget().getElement().getStyle().setPadding(0, Unit.PX);
  buttonBuilder.withResourceWidget(factoryLink).build();
  factoryLink.setReadOnly(true);
  final Tooltip launchFactoryTooltip =
      Tooltip.create(
          (elemental.dom.Element) launch.getElement(),
          PositionController.VerticalAlign.TOP,
          PositionController.HorizontalAlign.MIDDLE,
          locale.createFactoryLaunchTooltip());
  launchFactoryTooltip.setShowDelayDisabled(false);

  final Tooltip configureFactoryTooltip =
      Tooltip.create(
          (elemental.dom.Element) configure.getElement(),
          PositionController.VerticalAlign.TOP,
          PositionController.HorizontalAlign.MIDDLE,
          locale.createFactoryConfigureTooltip());
  configureFactoryTooltip.setShowDelayDisabled(false);
  factoryName.getElement().setAttribute("placeholder", "new-factory-name");
}
 
开发者ID:eclipse,项目名称:che,代码行数:45,代码来源:CreateFactoryViewImpl.java


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