本文整理汇总了Java中com.google.gwt.user.client.ui.HasText.getText方法的典型用法代码示例。如果您正苦于以下问题:Java HasText.getText方法的具体用法?Java HasText.getText怎么用?Java HasText.getText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.HasText
的用法示例。
在下文中一共展示了HasText.getText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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());
}
}
}
示例2: 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);
}
}
}
}
}
示例3: getValue
import com.google.gwt.user.client.ui.HasText; //导入方法依赖的package包/类
private static String getValue(HasText hasText) {
String value = hasText.getText();
if (hasText instanceof UIObject) {
handleSimpleValue((UIObject) hasText, value);
}
return value;
}
示例4: 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);
}