本文整理匯總了Java中com.google.gwt.user.client.ui.HasWidgets.clear方法的典型用法代碼示例。如果您正苦於以下問題:Java HasWidgets.clear方法的具體用法?Java HasWidgets.clear怎麽用?Java HasWidgets.clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.HasWidgets
的用法示例。
在下文中一共展示了HasWidgets.clear方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addWidgetTo
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
public static void addWidgetTo(Widget aWidet, HasWidgets aContainer) {
if (aContainer != null) {
aWidet.setVisible(true);
aContainer.clear();
if (aContainer instanceof BorderPane) {
((BorderPane) aContainer).add(aWidet);
} else if (aContainer instanceof MarginsPane) {
MarginConstraints mc = new MarginConstraints();
mc.setTop(new Margin(0, Style.Unit.PX));
mc.setBottom(new Margin(0, Style.Unit.PX));
mc.setLeft(new Margin(0, Style.Unit.PX));
mc.setRight(new Margin(0, Style.Unit.PX));
((MarginsPane) aContainer).add(aWidet, mc);
} else if (aContainer instanceof SplitPane) {
((SplitPane) aContainer).setFirstWidget(aWidet);
} else if (aContainer instanceof RootPanel) {
aContainer.add(aWidet);
} else {
aContainer.add(aWidet);
}
}
}
示例2: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(final HasWidgets container) {
bind();
container.clear();
container.add(view.asWidget());
init();
}
示例3: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
bind();
container.clear();
container.add(accountView.asWidget());
init();
}
示例4: apply
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
/**
* Apply the scaffolding together.
* @param container the base container for the scaffolding.
*/
protected void apply(HasWidgets container) {
container.clear();
container.add(topPanel);
container.add(tableBody);
topPanel.add(infoPanel);
topPanel.add(toolPanel);
tableBody.add(table);
table.addHead(new MaterialWidget(DOM.createElement("thead")));
table.addBody(new MaterialWidget(DOM.createElement("tbody")));
}
示例5: setRoot
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void setRoot(PerspectiveActivity activity,
PanelDefinition root) {
checkNotNull("root",
root);
final WorkbenchPanelPresenter oldRootPanelPresenter = mapPanelDefinitionToPresenter.remove(rootPanelDef);
if (!mapPanelDefinitionToPresenter.isEmpty()) {
String message = "Can't replace current root panel because it is not empty. The following panels remain: " + mapPanelDefinitionToPresenter;
mapPanelDefinitionToPresenter.put(rootPanelDef,
oldRootPanelPresenter);
throw new IllegalStateException(message);
}
HasWidgets perspectiveContainer = layoutSelection.get().getPerspectiveContainer();
perspectiveContainer.clear();
getBeanFactory().destroy(oldRootPanelPresenter);
this.rootPanelDef = root;
WorkbenchPanelPresenter newPresenter = mapPanelDefinitionToPresenter.get(root);
if (newPresenter == null) {
newPresenter = getBeanFactory().newRootPanel(activity,
root);
mapPanelDefinitionToPresenter.put(root,
newPresenter);
}
perspectiveContainer.add(newPresenter.getPanelView().asWidget());
}
示例6: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
container.clear();
container.add(m_view.asWidget());
m_restService.getInterfaceList();
}
示例7: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
/**
* start up the presenter.
*/
@Override
public void go(final HasWidgets container) {
bind();
container.clear();
container.add(display.asWidget());
display.setInfo(con.infoAssetLoging() + nodeId);
fetchAssetData();
}
示例8: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
container.clear();
container.add(adminView.asWidget());
init();
}
示例9: dispatch
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void dispatch(HasWidgets container) {
container.clear();
container.add(display.asWidget());
}
示例10: setPanel
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
private void setPanel(SetPanelGVO setPanelGVO, WindowActivity activity) {
WindowPlace windowPlace = activity.getPlace();
String context = windowPlace.getContext();
String windowId = windowPlace.getId();
String panelRefId = setPanelGVO.getTarget();
String panelRefKey = activity.getClientFactory().generateComponentKey(panelRefId, windowId, context);
List<UIObject> widgets = activity.getClientFactory().getComponentById(panelRefKey);
if ((widgets == null) || (widgets.size() == 0)) {
return;
}
UIObject widget = widgets.get(0);
if (!(widget instanceof HasWidgets)) {
return;
}
HasWidgets panelRef = (HasWidgets)widget;
ComponentGVO definitionComponentGVO = setPanelGVO.getSrc();
String viewKey = activity.getClientFactory().generateViewKey(windowId, context);
activity.getClientFactory().removeComponents(viewKey, panelRefId);
UIObject definitionComponent = AnyComponentRenderer.getInstance().render(definitionComponentGVO, panelRefId, context, windowId, context, activity);
if (definitionComponent instanceof Widget) {
panelRef.clear();
panelRef.add((Widget)definitionComponent);
if (panelRef instanceof Widget) {
Widget parentWidget = ((Widget)panelRef).getParent();
while (parentWidget != null) {
if (parentWidget instanceof ScrollPanel) {
ScrollPanel scrollPanel = (ScrollPanel)parentWidget;
scrollPanel.refresh();
break;
}
parentWidget = parentWidget.getParent();
}
}
// Register the events if it is not coming from the rendering process (PanelRefRenderer),
// because the events will be registered when the rendering process is done
if (setPanelGVO.getSenderId() != null) {
Map<UIObject,ComponentGVO> ownerComponents = activity.getClientFactory().getComponents(viewKey, panelRefId);
registerEvents(ownerComponents, windowId, context, activity);
}
}
}
示例11: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
container.clear();
container.add(view.asWidget());
}
示例12: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
container.clear();
container.add(getView().asWidget());
}
示例13: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(final HasWidgets container) {
container.clear();
container.add(m_view.asWidget());
}
示例14: go
import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
container.clear();
container.add(m_view.asWidget());
}