本文整理匯總了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");
}