Package com.google.gwt.dom.client

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


      // handle double clicks to enter edit more
      if ("dblclick".equals(type)) {
        beginEdit(context, parent, value);

        beginningEdit = true;
        InputElement input = getInputElement(parent);
        input.focus();
        beginningEdit = false;
      }

      // when not in edit mode - handle click events on the cell
      if ("click".equals(type)) {

        EventTarget eventTarget = event.getEventTarget();
        Element clickedElement = Element.as(eventTarget);
        String tagName = clickedElement.getTagName();

        // check whether the checkbox was clicked
        if (tagName.equals("INPUT")) {

          // if so, synchronise the model state
          InputElement input = clickedElement.cast();
          value.setDone(input.isChecked());

          // update the 'row' style
          if (input.isChecked()) {
            getViewRootElement(parent).addClassName("done");
          } else {
            getViewRootElement(parent).removeClassName("done");
          }
View Full Code Here


  /**
   * Commits the changes in text value to the ToDoItem
   */
  private void commitEdit(Element parent, ToDoItem value) {
    InputElement input = getInputElement(parent);
    value.setTitle(input.getValue());
  }
View Full Code Here

    replaceInputElement(DOM.createInputRadio(name));

  }

  private void replaceInputElement(Element elem) {
    InputElement newInputElem = InputElement.as(elem);
    // Collect information we need to set

    boolean checked = getValue();
    boolean enabled = isEnabled();
    String formValue = getFormValue();
View Full Code Here

    }
    setValue(true);
  }

  private void replaceInputElement(Element elem) {
    InputElement newInputElem = InputElement.as(elem);

    int tabIndex = getTabIndex();
    boolean checked = getValue();
    boolean enabled = isEnabled();
    String uid = input.getId();
View Full Code Here

  protected void onMouseDown(FieldEvent fe) {
    if (field instanceof CheckBox && !GXT.isIE) {
      // blur is firing before check box is changed
      // mouse down on input fires before blur so stop event to prevent blur
      Element target = fe.getEvent().getEventTarget().cast();
      InputElement input = field.el().selectNode("input").dom.cast();
      if (target == input.cast()) {
        fe.stopEvent();
      }
    }
  }
View Full Code Here

    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

      NodeList<Element> nodes = el().select(checkBoxSelector);
      int index = store.indexOf(m);
      if (index != -1) {
        Element e = nodes.getItem(index);
        if (InputElement.is(e)) {
          InputElement i = InputElement.as(e);
          i.setChecked(checked);
        }
      }
    } else {
      if (checkedPreRender == null) {
        checkedPreRender = new ArrayList<M>();
View Full Code Here

    }
    setValue(true);
  }

  private void replaceInputElement(Element elem) {
    InputElement newInputElem = InputElement.as(elem);

    int tabIndex = getTabIndex();
    boolean checked = getValue();
    boolean enabled = isEnabled();
    String uid = input.getId();
View Full Code Here

   *
   * @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

  protected void onMouseDown(FieldEvent fe) {
    if (field instanceof CheckBox && !GXT.isIE) {
      // blur is firing before check box is changed
      // mouse down on input fires before blur so stop event to prevent blur
      Element target = fe.getEvent().getEventTarget().cast();
      InputElement input = field.el().selectNode("input").dom.cast();
      if (target == input.cast()) {
        fe.stopEvent();
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.InputElement

Copyright © 2018 www.massapicom. 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.