本文整理匯總了Java中com.google.gwt.user.client.ui.CheckBox.ensureDebugId方法的典型用法代碼示例。如果您正苦於以下問題:Java CheckBox.ensureDebugId方法的具體用法?Java CheckBox.ensureDebugId怎麽用?Java CheckBox.ensureDebugId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.CheckBox
的用法示例。
在下文中一共展示了CheckBox.ensureDebugId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: CommitViewImpl
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
/** Create view. */
@Inject
protected CommitViewImpl(GitResources res, GitLocalizationConstant locale) {
this.res = res;
this.locale = locale;
this.message = new ShiftableTextArea();
this.ensureDebugId("git-commit-window");
this.setTitle(locale.commitTitle());
Widget widget = uiBinder.createAndBindUi(this);
this.setWidget(widget);
btnCancel =
createButton(
locale.buttonCancel(), "git-commit-cancel", event -> delegate.onCancelClicked());
btnCommit =
createButton(
locale.buttonCommit(), "git-commit-commit", event -> delegate.onCommitClicked());
btnCommit.addStyleName(resources.windowCss().primaryButton());
remoteBranches = new ListBox();
remoteBranches.setEnabled(false);
remoteBranches.getElement().setAttribute("style", "width: 230px");
pushAfterCommit = new CheckBox();
pushAfterCommit.setHTML(locale.commitPushCheckboxTitle());
pushAfterCommit.ensureDebugId("push-after-commit-check-box");
pushAfterCommit.addValueChangeHandler(event -> remoteBranches.setEnabled(event.getValue()));
pushAfterCommit.addStyleName(res.gitCSS().spacing());
getFooter().add(pushAfterCommit);
getFooter().add(remoteBranches);
addButtonToFooter(btnCommit);
addButtonToFooter(btnCancel);
}
示例2: create
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
@Override
public Widget create(String machineName, List<RuntimeInfo> runtimeList) {
VerticalPanel panel = new VerticalPanel();
panel.ensureDebugId("runtimeInfoVerticalPanel");
panel.setWidth("100%");
Label caption = new Label(locale.cellTableCaption(machineName));
caption.ensureDebugId("runtimeInfoCellTableCaption");
caption.addStyleName(resources.cellTableStyle().cellTableCaption());
HorizontalPanel hPanel = new HorizontalPanel();
hPanel.setWidth("100%");
hPanel.ensureDebugId("runtimeInfoCellTableHeaderWrapper");
hPanel.add(caption);
ListDataProvider<RuntimeInfo> dataProvider = new ListDataProvider<>(runtimeList);
CheckBox hideCheckBox = new CheckBox("Hide internal servers");
hideCheckBox.addValueChangeHandler(
event -> {
if (event.getValue()) { // if hide = true
dataProvider.setList(
runtimeList
.stream()
.filter(info -> !isNullOrEmpty(info.getPort()))
.collect(toList()));
} else {
dataProvider.setList(runtimeList);
}
dataProvider.refresh();
});
hideCheckBox.addStyleName(resources.cellTableStyle().cellTableHideServersCheckBox());
hideCheckBox.ensureDebugId("runtimeInfoHideServersCheckBox");
hPanel.add(hideCheckBox);
panel.add(hPanel);
panel.add(createCellTable(dataProvider));
return new ScrollPanel(panel);
}