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