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


Java HasWidgets.iterator方法代码示例

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


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

示例1: handleShowHide

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
private static void handleShowHide(Widget w, boolean doShow) {
    if (w == null) return;
    if (w instanceof VisibleListener) {
        if (doShow) {
            ((VisibleListener) w).onShow();
        } else {
            ((VisibleListener) w).onHide();
        }
    }
    if (w instanceof HasWidgets) {
        HasWidgets containers = (HasWidgets) w;
        for (Iterator<Widget> itr = containers.iterator(); itr.hasNext(); ) {
            handleShowHide(itr.next(), doShow);
        }
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:17,代码来源:GwtUtil.java

示例2: getValue

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
private static String getValue(FormPanel formPanel) {
	String value = null;
	
       if (formPanel instanceof HasWidgets) {
           HasWidgets hasWidgets = formPanel;
           Iterator<Widget> itr = hasWidgets.iterator();
           while (itr.hasNext()) {
               Widget widget = itr.next();
               if (widget instanceof Grid) {
                   Grid gridPanel = (Grid) widget;
                   FileUpload fileUpload = (FileUpload) gridPanel.getWidget(0, 0);
                   value = DOM.getElementAttribute(fileUpload.getElement(), "fu-uuid");
                   handleSimpleValue(formPanel, value);
               }
           }
       }
       
       return value;
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:20,代码来源:BuiltinHandlerHelper.java

示例3: gatherForm

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
private void gatherForm(Map<String, String> aFormData, HasWidgets aContainer) {
	Iterator<Widget> widgets = aContainer.iterator();
	while (widgets.hasNext()) {
		Widget w = widgets.next();
		if (w instanceof HasValue<?> && w instanceof HasJsName) {
			String name = ((HasJsName) w).getJsName();
			Object value = ((HasValue<Object>) w).getValue();
			if (name != null && !name.isEmpty() && (value == null || value instanceof String || value instanceof Number)) {
				aFormData.put(name, value != null ? value.toString() : null);
			}
		}
		if (w instanceof HasWidgets)
			gatherForm(aFormData, (HasWidgets) w);
	}
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:16,代码来源:PlatypusWindow.java

示例4: walk

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
public static void walk(Widget aWidget, Callback<Widget, Widget> aObserver) {
	aObserver.onSuccess(aWidget);
	if (aWidget instanceof HasWidgets) {
		HasWidgets widgets = (HasWidgets) aWidget;
		Iterator<Widget> wIt = widgets.iterator();
		while (wIt.hasNext()) {
			walk(wIt.next(), aObserver);
		}
	}
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:11,代码来源:WidgetsUtils.java

示例5: createSubmitCompleteHandler

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
public static SubmitCompleteHandler createSubmitCompleteHandler(final UIObject ui, final EventListenerGVO ev, final List<InputVariableGVO> inputVariables) {
	SubmitCompleteHandler submitCompleteHandler = new SubmitCompleteHandler() {
		public void onSubmitComplete(SubmitCompleteEvent event) {
			String uuId = event.getResults();
			boolean success = false;
			if ((uuId != null) && (uuId.indexOf("=") > 0)) {
				uuId = uuId.substring(uuId.indexOf("=") + 1);
				success = true;
			}
			FormPanel fp = (FormPanel) ui;
			if (fp instanceof HasWidgets) {
				HasWidgets hasWidgets = (HasWidgets) fp;
				Iterator<Widget> itr = hasWidgets.iterator();
				while (itr.hasNext()) {
					Widget widget = itr.next();
					if (widget instanceof Grid) {
						Grid gridPanel = (Grid) widget;
						FileUpload fileUpload = (FileUpload) gridPanel.getWidget(0, 0);
						if (success) {
							DOM.setElementAttribute(fileUpload.getElement(), "fu-uuid", uuId);
							CallbackHandler.createCallBack(ui, QAMLConstants.EVENT_ONFINISH, ev, inputVariables);
						} else {
							Label fileNameLabel = new Label("Uploading unsuccessfull.");// (Hyperlink)
																						// gridPanel.getWidget(1,
																						// 0);
							fileNameLabel.setText("Uploading unsuccessfull.");
							fileNameLabel.setVisible(true);
							gridPanel.add(fileNameLabel);
						}
					}
				}
			}
		}
	};
	return submitCompleteHandler;
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:37,代码来源:EventFactory.java

示例6: assignIndex

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
/**
 * This method assigns index for the elements in the FlexTable.
 * Assigning index enables tracking events on specific element.
 * @param UIObject child
 */
private void assignIndex(UIObject child,int index) {
	String tileId = DOM.getElementAttribute((Element)child.getElement(), "id");
	String tempTileId = "";
	if(tileId !=null && tileId.length()>0){
		tempTileId = tileId + QAMLConstants.TOKEN_INDEXING + index + QAMLConstants.TOKEN_INDEXING;
		
	
		DOM.setElementAttribute((Element)child.getElement(), "id", tempTileId);
		ComponentRepository.getInstance().putComponent(tempTileId, child);
	}
	if (child instanceof HasWidgets) {
		HasWidgets hasWidgets = (HasWidgets) child;
		Iterator<Widget> itr = hasWidgets.iterator();
		while (itr.hasNext()) {
			Widget widget = itr.next();
			if(widget instanceof HasWidgets){
				assignIndex(widget,index);
			} 
			String eleId = DOM.getElementAttribute((Element)widget.getElement(), "id");
			String tempStr = "";
			if(eleId !=null && eleId.length()>0){
				int exist = eleId.indexOf(QAMLConstants.TOKEN_INDEXING);
				if(exist < 0){
					tempStr = QAMLConstants.TOKEN_INDEXING + index + QAMLConstants.TOKEN_INDEXING + eleId;
					DOM.setElementAttribute((Element)widget.getElement(), "id", tempStr);
					ComponentRepository.getInstance().remove(eleId);
					ComponentRepository.getInstance().putComponent(tempStr, widget);
				}
			}
		}
	}
	ComponentRepository.getInstance().remove(tileId);
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:39,代码来源:Tiles.java

示例7: processWidgets

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
private void processWidgets(HasWidgets hasWidgets, Object value, SetValueGVO setValueGVO, DataContainerGVO dataContainerGVO) {
    Iterator<Widget> itr = hasWidgets.iterator();
    while (itr.hasNext()) {
        Widget widget = itr.next();
        processNamedComponent(widget, value, setValueGVO, dataContainerGVO);
        if (widget instanceof HasWidgets) {
            HasWidgets innerHasWidget = (HasWidgets) widget;
            processWidgets(innerHasWidget, value, setValueGVO, dataContainerGVO);
        }
    }
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:12,代码来源:SetValueHandler.java

示例8: processWidgets

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
public static void processWidgets(HasWidgets hasWidgets, SetValueGVO setValue) {
	Iterator<Widget> itr = hasWidgets.iterator();
	while (itr.hasNext()) {
		Widget widget = itr.next();
		processNamedComponent(widget, setValue);
		if (widget instanceof HasWidgets) {
			HasWidgets innerHasWidget = (HasWidgets) widget;
			processWidgets(innerHasWidget, setValue);
		}
	}
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:12,代码来源:SetValueExecute.java

示例9: removeAllWidgetsFrom

import com.google.gwt.user.client.ui.HasWidgets; //导入方法依赖的package包/类
public static void removeAllWidgetsFrom(final HasWidgets container) {
	Iterator<Widget> widgetIterator = container.iterator();
	for (Widget w = widgetIterator.next(); widgetIterator.hasNext(); widgetIterator.next()) {
		container.remove(w);
	}
}
 
开发者ID:opendata-euskadi,项目名称:r01fb,代码行数:7,代码来源:GWTWidgets.java


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