當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。