本文整理汇总了Java中com.google.gwt.user.client.ui.DeckPanel.showWidget方法的典型用法代码示例。如果您正苦于以下问题:Java DeckPanel.showWidget方法的具体用法?Java DeckPanel.showWidget怎么用?Java DeckPanel.showWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.DeckPanel
的用法示例。
在下文中一共展示了DeckPanel.showWidget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeParentVisible
import com.google.gwt.user.client.ui.DeckPanel; //导入方法依赖的package包/类
private void makeParentVisible(Widget widget) {
if (widget == null) {
return;
}
Widget parent = widget.getParent();
if (parent == null) {
return;
}
makeParentVisible(parent);
if (parent instanceof DeckPanel) {
DeckPanel deckPanel = (DeckPanel) parent;
int widgetIndex = deckPanel.getWidgetIndex(widget);
deckPanel.showWidget(widgetIndex);
TabPanel tabPanel = (TabPanel) deckPanel.getParent().getParent();
tabPanel.selectTab(widgetIndex);
}
}
示例2: makeParentsVisible
import com.google.gwt.user.client.ui.DeckPanel; //导入方法依赖的package包/类
private void makeParentsVisible(Widget w) {
if (w.getParent() != null) {
Widget parent = w.getParent();
makeParentsVisible(parent);
if (parent instanceof DeckPanel) {
DeckPanel dp = (DeckPanel) parent;
dp.showWidget(dp.getWidgetIndex(w));
((TabPanel) dp.getParent().getParent()).selectTab(dp.getWidgetIndex(w));
}
}
}
示例3: processAttributes
import com.google.gwt.user.client.ui.DeckPanel; //导入方法依赖的package包/类
private static void processAttributes(UIObject uiObject, String valueToSet, List<String> attributes, SetValueGVO setValue,DataContainerGVO valueDTC) {
if (uiObject != null && attributes != null) {
Iterator<String> itr = attributes.iterator();
while (itr.hasNext()) {
String attribute = itr.next();
if ("tooltip".equals(attribute)) {
if (uiObject instanceof TitledComponent) {
TitledComponent titledComponent = (TitledComponent) uiObject;
titledComponent.getTitleComponent().setTitle(valueToSet);
} else {
uiObject.setTitle(valueToSet);
}
} else if ("title".equals(attribute)) {
if (uiObject instanceof CaptionLayoutPanel) {
CaptionLayoutPanel titledPanel = (CaptionLayoutPanel) uiObject;
titledPanel.setTitle(valueToSet);
} else if (uiObject instanceof Panel) {
Panel p = (Panel) uiObject;
Widget parent = p.getParent();
if (parent != null && parent instanceof DeckPanel) {
DeckPanel deckPanel = (DeckPanel) parent;
int widgetIndex = deckPanel.getWidgetIndex(p);
if (widgetIndex != -1) {
deckPanel.showWidget(widgetIndex);
}
}
}
} else if ("prompt".equals(attribute)) {
if (uiObject instanceof HasPrompt) {
HasPrompt hasPrompt = (HasPrompt) uiObject;
hasPrompt.setPrompt(valueToSet);
} else if (uiObject instanceof CheckBox) {
((CheckBox) uiObject).setText(valueToSet);
}
} else if ("value".equals(attribute)) {
processValue(uiObject, valueToSet, setValue,valueDTC);
}
}
}
}