Examples of InputElement


Examples of com.google.gwt.dom.client.InputElement

   * grouping. (See implementation of {@link RadioButton#setName}.)
   *
   * @param elem the new input element
   */
  protected void replaceInputElement(Element elem) {
    InputElement newInputElem = InputElement.as(elem);
    // Collect information we need to set
    int tabIndex = getTabIndex();
    boolean checked = getValue();
    boolean enabled = isEnabled();
    String formValue = getFormValue();
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

* @author Uri Boness
*/
public class DefaultTextCellEditor implements CellEditor<String> {

    public void edit(Element cell, Record record, String value, DataType<String> type, final Callback<String> callback) {
        final InputElement input = InputElement.as(DOM.createElement("input"));
        input.setValue(value);
        input.getStyle().setWidth(100, Style.Unit.PCT);
        input.getStyle().setHeight(100, Style.Unit.PCT);
        EventUtils.addHandler(input.<Element>cast(), Event.ONKEYPRESS | Event.ONBLUR, new Handler<Event>() {
            public void handle(Event event) {
                if (event.getTypeInt() == Event.ONKEYPRESS && event.getKeyCode() != KeyCodes.KEY_ENTER) {
                    return;
                }
                String value = input.getValue();
                callback.handleNewValue(value);
            }
        });
        cell.setInnerHTML("");
        cell.appendChild(input);
        input.focus();
    }
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

            NodeList<Node> childNodes = getElement().getChildNodes();
            String id = null;
            for (int i = 0; i < childNodes.getLength(); i++) {
                Node item = childNodes.getItem(i);
                if (item.getNodeName().toLowerCase().equals("input")) {
                    InputElement input = (InputElement) item;
                    id = input.getId();
                }
                if (item.getNodeName().toLowerCase().equals("label")) {
                    LabelElement label = (LabelElement) item;
                    if (breakLink) {
                        label.setHtmlFor("");
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

            NodeList<Node> childNodes = getElement().getChildNodes();
            String id = null;
            for (int i = 0; i < childNodes.getLength(); i++) {
                Node item = childNodes.getItem(i);
                if (item.getNodeName().toLowerCase().equals("input")) {
                    InputElement input = (InputElement) item;
                    id = input.getId();
                }
                if (item.getNodeName().toLowerCase().equals("label")) {
                    LabelElement label = (LabelElement) item;
                    if (breakLink) {
                        label.setHtmlFor("");
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

    if (rendered) {
      List<M> l = new ArrayList<M>();
      NodeList<Element> nodes = el().select(checkBoxSelector);
      for (int i = 0; i < nodes.getLength(); i++) {
        if (InputElement.is(nodes.getItem(i))) {
          InputElement e = InputElement.as(nodes.getItem(i));
          if (e.isChecked()) {
            l.add(getStore().getAt(i));
          }
        }
      }
      return l;
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

     * @param value the field value
     * @return the input element
     */
    private static InputElement createHiddenInput(String name, String value) {

        InputElement input = Document.get().createHiddenInputElement();
        input.setName(name);
        input.setValue(value);
        return input;
    }
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

   * @param parent the parent element
   * @param value the current value
   */
  protected void edit(Context context, Element parent, String value) {
    setValue(context, parent, value);
    InputElement input = getInputElement(parent);
    input.focus();
    input.select();
  }
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

   * @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;
  }
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

        }

        // Determine if we clicked on a checkbox.
        Element target = nativeEvent.getEventTarget().cast();
        if ("input".equals(StringCase.toLower(target.getTagName()))) {
          final InputElement input = target.cast();
          if ("checkbox".equals(StringCase.toLower(input.getType()))) {
            // Synchronize the checkbox with the current selection state.
            input.setChecked(event.getDisplay().getSelectionModel().isSelected(
                event.getValue()));
            return SelectAction.TOGGLE;
          }
        }
        return SelectAction.IGNORE;
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

     */
    @Override
    protected void onEnterKeyDown(Context context, Element parent,
        Contact value, NativeEvent event, ValueUpdater<Contact> valueUpdater) {
      // Toggle the checkbox.
      InputElement input = getInputElement(parent);
      input.setChecked(!input.isChecked());

      // Update the favorites based on the new state.
      updateFavorites(parent, value);

      // Show the new list of favorites.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.