当前位置: 首页>>代码示例>>Java>>正文


Java HasWidgets.add方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.HasWidgets.add方法的典型用法代码示例。如果您正苦于以下问题:Java HasWidgets.add方法的具体用法?Java HasWidgets.add怎么用?Java HasWidgets.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.HasWidgets的用法示例。


在下文中一共展示了HasWidgets.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: installViews

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
@Override
public void installViews(List<HasWidgets> placeholders) {
    setResponseFromElement(multiViewElements.get(0));
    maxSelections = XMLUtils.getAttributeAsInt(multiViewElements.get(0), "maxSelections");

    for (int i = 0; i < multiViewElements.size(); i++) {
        Element element = multiViewElements.get(i);
        SelectableChoicePresenter selectableChoice = createSelectableChoiceFromElement(element);

        addClickHandler(selectableChoice);

        HasWidgets currPlaceholder = placeholders.get(i);
        currPlaceholder.add(selectableChoice.getView());
        choicesManager.addChoice(selectableChoice);
    }
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:17,代码来源:IdentificationModule.java

示例2: createSingleViewModule

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
@Override
public void createSingleViewModule(Element element, HasWidgets parent, BodyGeneratorSocket bodyGeneratorSocket) {
    IModule module = registry.createModule(element);

    parenthood.addChild(module);
    registerModuleFeedbacks(module, element);

    if (module instanceof ISingleViewWithBodyModule) {
        parenthood.pushParent((ISingleViewWithBodyModule) module);
        ((ISingleViewWithBodyModule) module).initModule(element, moduleSocket, bodyGeneratorSocket, eventsBus);
        parenthood.popParent();
    } else if (module instanceof ISingleViewSimpleModule) {
        ((ISingleViewSimpleModule) module).initModule(element, moduleSocket, eventsBus);
    } else if (module instanceof IInlineModule) {
        ((IInlineModule) module).initModule(element, moduleSocket, eventsBus);
    }
    if (((ISingleViewModule) module).getView() instanceof Widget) {
        parent.add(((ISingleViewModule) module).getView());
    }

    singleViewModules.add(module);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:23,代码来源:ModulesInstalator.java

示例3: Application

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
public Application(final HasWidgets gwtFrame) {
            
    // Build the application scaffolding; Header, Footer, Accordion
    //    and content presenter panel
    // Fill the entire browser window with the application
    
    injector.getApplicationPresenter().setInjector(injector);
    gwtFrame.add(injector.getApplicationPresenter().getView());

    // Instance both the WF Listing, WF Definition, Graphviz and Simulator 
    //    presenters so that they can send/receive events between each other
    
    injector.getWorkflowsPresenter();
    injector.getWfDefinitionPresenter();
    injector.getGraphvizPresenter();
    injector.getSimulatorPresenter();
    
    // Start with the Workflow listings content
    injector.getEventBus().fireEvent(new SwitchToPresenterEvent("workflows.section"));
}
 
开发者ID:will-gilbert,项目名称:OSWf-OSWorkflow-fork,代码行数:21,代码来源:Application.java

示例4: go

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
@Override
public void go(HasWidgets hasWidgets) {
	hasWidgets.add(getWordView().asWidget());
	context.getPlatformBus().addHandler(OpenFileEvent.TYPE, new OpenFileEvent.OpenFileHandler(){
		@Override
		public void onOpenFile(OpenFileEvent event) {
			FileModel model=event.getModel();
			if(!model.isFolder()){
				open(model.getId(), null);
				if(model.getOwner().equals(context.getUser().getUid())){
					History.newItem(new PlacePath().toApp(App.Document)
							.toDocType(DocType.MyDoc)
							.toDocId(model.getId()).create().getToken(), false);
				}else{
					History.newItem(new PlacePath().toApp(App.Document)
							.toDocType(DocType.SharedDoc)
							.toDocId(model.getId())
							.create().getToken(), false);
				}
			}
		}
	});
	
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:25,代码来源:WordPresenterImpl.java

示例5: getPresenter

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
@Override
public Presenter getPresenter() {
	return new Presenter() {
		public void go(HasWidgets hasWidgets) {
			hasWidgets.add(widget);
			String id=GWTEnvironment.getHomeTemplateId();
			RPCS.getFileManagerService().getHomeFile(id, new AbstractAsyncCallback<FileModel>() {
				public void onSuccess(FileModel result) {
					widget.setContent(result.getContent());
				}
				@Override
				public void onFailure(Throwable caught) {
					TemplateResources templates=GWT.create(TemplateResources.class);
					widget.setContent(templates.home().getText());
				}
			});
		}
		@Override
		public PlatformContext getPlatformContext() {
			return null;
		}
	};
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:24,代码来源:HomeApp.java

示例6: addCustomPanelOnContainer

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
private CustomPanelDefinition addCustomPanelOnContainer(final Object container,
                                                        CustomPanelDefinitionImpl panelDef) {
    final WorkbenchPanelPresenter panelPresenter = beanFactory.newWorkbenchPanel(panelDef);
    Widget panelViewWidget = panelPresenter.getPanelView().asWidget();
    panelViewWidget.addAttachHandler(new CustomPanelCleanupHandler(panelPresenter));

    if (container instanceof HasWidgets) {
        HasWidgets widgetContainer = (HasWidgets) container;
        widgetContainer.add(panelViewWidget);
        customPanels.put(panelDef,
                         widgetContainer);
    } else {
        HTMLElement htmlContainer = (HTMLElement) container;
        appendWidgetToElement(htmlContainer,
                              panelViewWidget);
        customPanelsInsideHTMLElements.put(panelDef,
                                           htmlContainer);
    }

    mapPanelDefinitionToPresenter.put(panelDef,
                                      panelPresenter);
    onPanelFocus(panelDef);
    return panelDef;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:PanelManagerImpl.java

示例7: 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

示例8: renderLayout

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
protected UIObject renderLayout(PanelGVO panelGVO, AbsoluteLayoutGVO layoutGVO, String owner, String uuid, String parent, String context, AbstractActivity activity) {
	HasWidgets panel = createPanel();
	ElementGVO[] elements = layoutGVO.getElements();
	if ((elements != null) && (elements.length > 0)) {
		ScrollPanel scrollPanel = createScrollPanel();
		panel.add(scrollPanel);
		QLayoutAbsolute layout = new QLayoutAbsolute();
		for (ElementGVO elementGVO : elements) {
			UIObject child = renderChildComponent(elementGVO.getComponent(), owner, uuid, parent, context, activity);
			if (child instanceof Widget) {
				int posX = elementGVO.getX();
				int posY = elementGVO.getY();
				layout.add((Widget)child, posX, posY);					
			}
		}
		scrollPanel.setWidget(layout);
		scrollPanel.refresh();
	}
	return (UIObject)panel;
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:21,代码来源:AbstractPanelRenderer.java

示例9: getPresenter

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
@Override
public Presenter getPresenter() {
	return new Presenter() {
		public void go(HasWidgets hasWidgets) {
			hasWidgets.add(widget);
			String id=GWTEnvironment.getHomeTemplateId();
			RPCS.getFileManagerService().getFile(id, new AbstractAsyncCallback<FileModel>() {
				public void onSuccess(FileModel result) {
					widget.setContent(result.getContent());
				}
				@Override
				public void onFailure(Throwable caught) {
					TemplateResources templates=GWT.create(TemplateResources.class);
					widget.setContent(templates.home().getText());
				}
			});
		}
		@Override
		public PlatformContext getPlatformContext() {
			return null;
		}
	};
}
 
开发者ID:zogwei,项目名称:zeus3,代码行数:24,代码来源:HomeApp.java

示例10: attachMediaScreenToFullscreenTemplate

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
private void attachMediaScreenToFullscreenTemplate(Widget parent) {
    Widget parentWrapper = parent.getParent();
    if (parentWrapper instanceof HasWidgets) {
        HasWidgets parentPanel = (HasWidgets) parentWrapper;
        parentPanel.add(getMediaObject());
    }
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:8,代码来源:ObjectTemplateParser.java

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: 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:vishwaabhinav,项目名称:OpenNMS,代码行数:8,代码来源:SnmpSelectListPresenter.java


注:本文中的com.google.gwt.user.client.ui.HasWidgets.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。