當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。