当前位置: 首页>>代码示例>>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;未经允许,请勿转载。