本文整理匯總了Java中com.google.gwt.user.client.ui.HorizontalPanel.ensureDebugId方法的典型用法代碼示例。如果您正苦於以下問題:Java HorizontalPanel.ensureDebugId方法的具體用法?Java HorizontalPanel.ensureDebugId怎麽用?Java HorizontalPanel.ensureDebugId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.HorizontalPanel
的用法示例。
在下文中一共展示了HorizontalPanel.ensureDebugId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: StatusBarBranchPointer
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
@Inject
public StatusBarBranchPointer(
AppContext appContext,
GitResources resources,
BranchPresenter branchPresenter,
GitLocalizationConstant constant) {
super();
this.appContext = appContext;
this.resources = resources;
this.branchPresenter = branchPresenter;
this.constant = constant;
panel = new HorizontalPanel();
panel.ensureDebugId("statusBarProjectBranchPointerPanel");
}
示例2: create
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的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);
}