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


Java InputElement.getValue方法代码示例

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


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

示例1: doChange

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
private void doChange(FormEvent event) {
    InputElement e = InputElement.as(event.target);
    String val = e.getValue();
    setState(State.make(val));
}
 
开发者ID:GWTReact,项目名称:gwt-react-examples,代码行数:6,代码来源:StatefulExample.java

示例2: getItemText

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
/**
 * Gets the text associated with the item at the specified index.
 *
 * @param index the index of the item whose text is to be retrieved
 * @return the text associated with the item
 * @throws IndexOutOfBoundsException if the index is out of range
 */
public String getItemText(int index) {
  checkIndex(index);
  final Element optionElement = (Element) optionsPanel.getElement().getChild(index);
  final InputElement labelElement =
      (InputElement) optionElement.getElementsByTagName("input").getItem(0);

  return labelElement.getValue();
}
 
开发者ID:eclipse,项目名称:che,代码行数:16,代码来源:CustomComboBox.java

示例3: getValue

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
/**
 * Gets the value associated with the item at a given index.
 *
 * @param index the index of the item to be retrieved
 * @return the item's associated value
 * @throws IndexOutOfBoundsException if the index is out of range
 */
public String getValue(int index) {
  checkIndex(index);
  final Element optionElement = (Element) optionsPanel.getElement().getChild(index);
  final InputElement inputElement =
      (InputElement) optionElement.getElementsByTagName("input").getItem(0);

  return inputElement.getValue();
}
 
开发者ID:eclipse,项目名称:che,代码行数:16,代码来源:CustomComboBox.java

示例4: updateViewData

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
/**
 * Update the view data based on the current value.
 *
 * @param parent the parent element
 * @param viewData the {@link ViewData} object to update
 * @param isEditing true if in edit mode
 * @return the new value
 */
private String updateViewData(Element parent, ViewData viewData,
    boolean isEditing) {
  InputElement input = (InputElement) parent.getFirstChild();
  String value = input.getValue();
  viewData.setText(value);
  viewData.setEditing(isEditing);
  return value;
}
 
开发者ID:waynedyck,项目名称:gwt-gantt,代码行数:17,代码来源:CellTextImpl.java

示例5: onBrowserEvent

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
@Override
public void onBrowserEvent(Context context, Element parent, String value,
    NativeEvent event, ValueUpdater<String> valueUpdater) {
    
  super.onBrowserEvent(context, parent, value, event, valueUpdater);

  // Ignore events that don't target the input.
  InputElement input = getInputElement(parent);
  Element target = event.getEventTarget().cast();
  if (!input.isOrHasChild(target)) {
    return;
  }

  String eventType = event.getType();
  Object key = context.getKey();
  if (BrowserEvents.BLUR.equals(eventType)) {
    finishEditing(parent, value, key, valueUpdater);
  } else if (BrowserEvents.CHANGE.equals(eventType) || 
          BrowserEvents.KEYUP.equals(eventType) ||
          PASTE.equals(eventType)) {
    ViewData vd = getViewData(key);
    if (vd == null) {
      vd = new ViewData(value);
      setViewData(key, vd);
    }
    
    String newValue = input.getValue();
    
    vd.setCurrentValue(input.getValue());
    
    if (valueUpdater != null && !vd.getCurrentValue().equals(vd.getLastValue())) {
        vd.setLastValue(newValue);
        valueUpdater.update(newValue);
    }
  }
}
 
开发者ID:kaaproject,项目名称:avro-ui,代码行数:37,代码来源:FilterTextInputCell.java

示例6: onBrowserEvent

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
@Override
public void onBrowserEvent(Context context, Element parent, String value,
    NativeEvent event, ValueUpdater<String> valueUpdater) {
  super.onBrowserEvent(context, parent, value, event, valueUpdater);

  // Ignore events that don't target the input.
  Element target = event.getEventTarget().cast();
  if (!parent.getFirstChildElement().isOrHasChild(target)) {
    return;
  }

  Object key = context.getKey();
  ValidationData viewData = getViewData(key);
  String eventType = event.getType();
  if ("change".equals(eventType)) {
    InputElement input = parent.getFirstChild().cast();

    // Mark cell as containing a pending change
    input.getStyle().setColor("blue");

    // Save the new value in the view data.
    if (viewData == null) {
      viewData = new ValidationData();
      setViewData(key, viewData);
    }
    String newValue = input.getValue();
    viewData.setValue(newValue);
    finishEditing(parent, newValue, key, valueUpdater);

    // Update the value updater, which updates the field updater.
    if (valueUpdater != null) {
      valueUpdater.update(newValue);
    }
  }
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:36,代码来源:CwCellValidation.java

示例7: updateViewData

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
/**
 * Update the view data based on the current value.
 * @param parent the parent element
 * @param viewData the {@link ViewData} object to update
 * @param isEditing true if in edit mode
 * @return the new value
 */
private String updateViewData( Element parent,
                               ViewData viewData,
                               boolean isEditing ) {
    InputElement input = (InputElement) parent.getFirstChild();
    String value = input.getValue();
    viewData.setText( value );
    viewData.setEditing( isEditing );
    return value;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:17,代码来源:WaterMarkEditTextCell.java

示例8: postSuperRefresh

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
@Override
public void postSuperRefresh() {
	String action="com.jcommerce.gwt.server.BrandGWTAction";
	String method="";
	
	if(getCurState().getIsEdit()) {
		method = "update";
		idField.setValue(getCurState().getId());
	}else {
		method = "add";
		idField.setValue(null);
	}
	formPanel.setAction(GWTHttpDynaForm.constructURL(action, method));
	
	boolean enabled = fufLogo.isEnabled();
	boolean isreadonly = fufLogo.isReadOnly();
	
	System.out.println("isenabled? "+enabled+", readonly? "+isreadonly);
	fufLogo.reset();
	fufLogo.setValue("");
	isreadonly = fufLogo.isReadOnly();
	enabled = fufLogo.isEnabled();
	System.out.println("isenabled? "+enabled+", readonly? "+isreadonly);
	InputElement ele = fufLogo.getFileInput();
	if(ele!=null) {
		String val = ele.getValue();
		String type = ele.getType();
		String name = ele.getName();
		System.out.println("val: +"+val+", type="+type+", name="+name);
	}
	fufLogo.setEnabled(true);
	fufLogo.setReadOnly(false);

}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:35,代码来源:BrandPanel.java

示例9: getData

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
@Override
public String getData(final InputElement input, String attribute) {
    return input.getValue();
}
 
开发者ID:liraz,项目名称:gwt-backbone,代码行数:5,代码来源:InputElementStringAdapter.java

示例10: updateViewData

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
/**
 * Update the view data based on the current value.
 *
 * @param parent
 *            the parent element
 * @param viewData
 *            the {@link ViewData} object to update
 * @param isEditing
 *            true if in edit mode
 * @return the new value
 */
private TaskGridNameCellDetails updateViewData(Element parent, ViewData viewData,
                boolean isEditing) {
        InputElement input = (InputElement) parent.getFirstChild();
        String value = input.getValue();
        viewData.setText(value);
        viewData.setEditing(isEditing);
        return viewData.getTask();
}
 
开发者ID:waynedyck,项目名称:gwt-gantt,代码行数:20,代码来源:TaskGridNameCell1.java

示例11: updateViewData

import com.google.gwt.dom.client.InputElement; //导入方法依赖的package包/类
/**
 * Update the view data based on the current value.
 *
 * @param parent
 *            the parent element
 * @param viewData
 *            the {@link ViewData} object to update
 * @param isEditing
 *            true if in edit mode
 * @return the new value
 */
private Task updateViewData(Element parent, ViewData viewData, boolean isEditing) {
        InputElement input = (InputElement) parent.getFirstChild();
        String value = input.getValue();
        viewData.setText(value);
        viewData.setEditing(isEditing);
        return viewData.getTask();
}
 
开发者ID:waynedyck,项目名称:gwt-gantt,代码行数:19,代码来源:TaskGridNameCell.java


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