當前位置: 首頁>>代碼示例>>Java>>正文


Java HasWidgets.clear方法代碼示例

本文整理匯總了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);
		}
	}
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:23,代碼來源:WidgetsUtils.java

示例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();
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:8,代碼來源:MonitorPresenter.java

示例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();
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:8,代碼來源:AccountPresenter.java

示例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")));
}
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material-table,代碼行數:17,代碼來源:TableScaffolding.java

示例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());
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:31,代碼來源:PanelManagerImpl.java

示例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();
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:8,代碼來源:SnmpSelectListPresenter.java

示例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();
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:12,代碼來源:AssetPagePresenter.java

示例8: go

import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
	container.clear();
	container.add(adminView.asWidget());
	init();
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:7,代碼來源:AdminPresenter.java

示例9: dispatch

import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void dispatch(HasWidgets container) {
    container.clear();
    container.add(display.asWidget());
}
 
開發者ID:treblereel,項目名稱:GwtErraiMaterialMvcExample,代碼行數:6,代碼來源:FamePresenter.java

示例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);	
		}
	}
}
 
開發者ID:qafedev,項目名稱:qafe-platform,代碼行數:45,代碼來源:SetPanelExecute.java

示例11: go

import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
	container.clear();
	container.add(view.asWidget());
}
 
開發者ID:alexjj,項目名稱:encfsanywhere,代碼行數:6,代碼來源:ListPresenter.java

示例12: go

import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
    container.clear();
    container.add(getView().asWidget());
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:6,代碼來源:ReportSelectListPresenter.java

示例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());
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:6,代碼來源:SuggestionComboboxPresenter.java

示例14: go

import com.google.gwt.user.client.ui.HasWidgets; //導入方法依賴的package包/類
@Override
public void go(HasWidgets container) {
    container.clear();
    container.add(m_view.asWidget());
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:6,代碼來源:KscComboboxPresenter.java


注:本文中的com.google.gwt.user.client.ui.HasWidgets.clear方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。