本文整理汇总了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;
}
示例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");
}