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


Java HasText.setText方法代码示例

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


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

示例1: updateChecksum

import com.google.gwt.user.client.ui.HasText; //导入方法依赖的package包/类
private void updateChecksum(UIObject uiObject, DataMap dataMap) {
	UIObject component = getComponentByName(uiObject, DataContainerGVO.QAFE_CHECKSUM);
	if (component != null) {
		int checksum = 0;
		for (Map.Entry<String, DataContainerGVO> field : dataMap.entrySet()) {
			if (!isMetaData(field.getKey())) {
				Object value = field.getValue().createType();
				checksum += QAMLUtil.calculateChecksum(field.getKey(), value);
			}
		}
		if (component instanceof HasText) {
			HasText hasText = (HasText)component;
			hasText.setText(String.valueOf(checksum));
		}
	}
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:17,代码来源:UpdateModelExecute.java

示例2: validate

import com.google.gwt.user.client.ui.HasText; //导入方法依赖的package包/类
public static boolean validate(String url, HasText errorWidget) {
	if(url != null && url.trim().length() > 0) {
		try {
			UrlParser.parse(url.trim());
			return true;
		} catch(Exception e) {
			if(errorWidget != null) {
				errorWidget.setText(e.getMessage());
			}
		}
	}
	return false;
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:14,代码来源:UrlValidator.java

示例3: handleValueAttribute

import com.google.gwt.user.client.ui.HasText; //导入方法依赖的package包/类
private void handleValueAttribute(TextFieldGVO gvo, UIObject uiObject) {
	String value = gvo.getValue();
	if ((value != null) && (value.length() > 0)) {
		if (uiObject instanceof HasData) {
			HasData hasData = (HasData)uiObject;
			hasData.setData(value, SetValueGVO.ACTION_ADD, null);
		} else if (uiObject instanceof HasText) {
			HasText hasText = (HasText)uiObject;
			String oldValue = hasText.getText();
			hasText.setText(value);
			doDataChange(gvo, uiObject, oldValue, hasText.getText());
		}
	}
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:15,代码来源:TextFieldRenderer.java

示例4: handleDisplayName

import com.google.gwt.user.client.ui.HasText; //导入方法依赖的package包/类
private void handleDisplayName(UIObject uiObject, BuiltInComponentGVO builtInComponentGVO,
        String value) {
    if (uiObject instanceof HasDataGridMethods) {
        HasDataGridMethods hasDataGridMethods = (HasDataGridMethods)uiObject;
        String uuid = builtInComponentGVO.getComponentIdUUID();
        if (uuid != null) {
            boolean containsColumn = uuid.contains(".");
            if (containsColumn) {
                String columnId = uuid.replaceFirst(".+\\.", "").replaceFirst("\\|.+", "");
                hasDataGridMethods.setColumnLabel(columnId, value);
            }
        }
    } else if (uiObject instanceof PushButton) {
        ((PushButton)uiObject).getUpFace().setText(value);
        ((PushButton)uiObject).getDownFace().setText(value);
    } else if (uiObject instanceof HasText) {
        HasText t = (HasText)uiObject;
        t.setText(value);
    } else if (uiObject instanceof VerticalPanel) {
        VerticalPanel vp = (VerticalPanel)uiObject;
        Widget tabPanelWidget = vp.getParent().getParent().getParent();
        if (tabPanelWidget instanceof TabPanel) {
            TabPanel tp = (TabPanel)tabPanelWidget;
            TabBar tb = tp.getTabBar();
            int tabCount =tp.getWidgetCount();
            for (int i=0;i < tabCount;i++){
                Widget w = tp.getWidget(i);
                if (w == vp){
                    tb.setTabText(i, value);
                }
            }
        }
    } else if (uiObject instanceof QWindowPanel) {
        QWindowPanel p = (QWindowPanel) uiObject;
        p.setCaption(value);
    }
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:38,代码来源:SetPropertyHandler.java

示例5: copy

import com.google.gwt.user.client.ui.HasText; //导入方法依赖的package包/类
private void copy(CopyGVO copyGVO, UIObject sender, String appId, String windowId, String eventSessionId) {
	String toKey = generateId(copyGVO.getTo(), windowId, appId, eventSessionId);
	String fromKey = generateId(copyGVO.getFrom(), windowId, appId, eventSessionId);
	
	List<UIObject> uiObjectsFrom = getUIObjects(fromKey);
	if (uiObjectsFrom == null) {
		return;
	}
	
	List<UIObject> uiObjectsTo = getUIObjects(toKey);
	if (uiObjectsTo == null) {
		return;
	}
	if (uiObjectsTo.size()==uiObjectsFrom.size()){
		for (int i=0;i<uiObjectsTo.size();i++){
			UIObject uiObjectFrom = uiObjectsFrom.get(i);
			UIObject uiObjectTo = uiObjectsTo.get(i);
			
			if (uiObjectFrom instanceof HasText) {
				HasText hasTextFrom = (HasText) uiObjectFrom;
				String fromValue = hasTextFrom.getText();
				if (uiObjectTo instanceof HasText) {
					HasText hasTextTo = (HasText) uiObjectTo;
					hasTextTo.setText(fromValue);
				}
			}
		
		}
	}
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:31,代码来源:CopyHandler.java

示例6: execute

import com.google.gwt.user.client.ui.HasText; //导入方法依赖的package包/类
public void execute(BuiltInFunctionGVO builtInFunction) {
	if (builtInFunction instanceof CopyGVO) {
		CopyGVO copy = (CopyGVO) builtInFunction;

		List<UIObject> uiObjectsFrom = null;
		if (copy.getFromGVO().getComponentIdUUID() != null) {
			uiObjectsFrom = RendererHelper.getComponent(copy.getFromGVO().getComponentIdUUID());
		} else {
			uiObjectsFrom = RendererHelper.getNamedComponent(copy.getFromGVO().getComponentName());
		}

		List<UIObject> uiObjectsTo = null;
		if (copy.getToGVO().getComponentIdUUID() != null) {
			uiObjectsTo = RendererHelper.getComponent(copy.getToGVO().getComponentIdUUID());
		} else {
			uiObjectsTo = RendererHelper.getNamedComponent(copy.getToGVO().getComponentName());
		}

		if (uiObjectsTo != null && uiObjectsFrom != null) {
			if (uiObjectsTo.size()==uiObjectsFrom.size()){
				for (int i=0;i<uiObjectsTo.size();i++){
					UIObject uiObjectFrom = uiObjectsFrom.get(i);
					UIObject uiObjectTo = uiObjectsTo.get(i);
					
					if (uiObjectFrom instanceof HasText) {
						HasText hasTextFrom = (HasText) uiObjectFrom;
						String fromValue = hasTextFrom.getText();
						if (uiObjectTo instanceof HasText) {
							HasText hasTextTo = (HasText) uiObjectTo;
							hasTextTo.setText(fromValue);
						}
					}
				
				}
			}
		}
	}
	FunctionsExecutor.setProcessedBuiltIn(true);
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:40,代码来源:CopyExecute.java


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