本文整理匯總了Java中com.google.gwt.user.client.ui.UIObject.ensureDebugId方法的典型用法代碼示例。如果您正苦於以下問題:Java UIObject.ensureDebugId方法的具體用法?Java UIObject.ensureDebugId怎麽用?Java UIObject.ensureDebugId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.UIObject
的用法示例。
在下文中一共展示了UIObject.ensureDebugId方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: renderChildren
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void renderChildren() {
elementsMap = new HashMap<>();
CategoryRenderer categoryRenderer = category.getRenderer();
for (Object o : category.getData()) {
ListItem<?> element =
ListItem.create(categoryRenderer, resources.defaultCategoriesListCss(), o);
categoryRenderer.renderElement(element, o);
elementsMap.put(o, element);
if (element.getId().isEmpty()) {
UIObject.ensureDebugId(element, "projectWizard-" + element.getInnerText());
}
container.getElement().appendChild(element);
}
if (elementsMap.isEmpty()) {
expandControl.getStyle().setVisibility(Style.Visibility.HIDDEN);
} else {
expandControl.getStyle().setVisibility(Style.Visibility.VISIBLE);
}
}
示例2: ensureDebugId
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
public static void ensureDebugId(Element element, String id) {
final String uniqueId = com.google.gwt.dom.client.Document.get().createUniqueId();
final String trimId = Strings.nullToEmpty(id).trim();
final String debugId = Strings.isNullOrEmpty(trimId) ? uniqueId : trimId + "-" + uniqueId;
UIObject.ensureDebugId((com.google.gwt.dom.client.Element) element, debugId);
}
示例3: ExtensionManagerViewImpl
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
@Inject
public ExtensionManagerViewImpl(
ToolbarPresenter toolbarPresenter, ActionManager actionManager, Resources resources) {
dataGrid = new DataGrid<>(100, resources);
rootElement = ourUiBinder.createAndBindUi(this);
DefaultActionGroup actionGroup =
new DefaultActionGroup("extensionManager", false, actionManager);
actionManager.registerAction("extensionManagerGroup", actionGroup);
toolbarPresenter.bindMainGroup(actionGroup);
UIObject.ensureDebugId(descriptionArea, "window-preferences-extensions-descriptionArea");
Column<ExtensionDescription, String> titleColumn =
new Column<ExtensionDescription, String>(new TextCell()) {
@Override
public String getValue(ExtensionDescription object) {
return object.getTitle();
}
};
titleColumn.setCellStyleNames(style.titleColumn());
dataGrid.addColumn(titleColumn);
SingleSelectionModel<ExtensionDescription> selectionModel =
new SingleSelectionModel<ExtensionDescription>();
dataGrid.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(
new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {}
});
}
示例4: updateEnabledState
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
private void updateEnabledState() {
pressed = false;
if (enabled && hasVisibleItems) {
element.setClassName(css.menuBarItem());
} else {
element.setClassName(css.menuBarItemDisabled());
}
UIObject.ensureDebugId(element, "MenuItem/" + actionManager.getId(group) + "-" + enabled);
}