Package com.google.gwt.dom.client

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


        String type = event.getType();

        boolean enterPressed = "keydown".equals( type ) && event.getKeyCode() == KeyCodes.KEY_ENTER;
        if ( "click".equals( type ) || enterPressed ) {
            InputElement input = parent.getFirstChild().cast();
            Boolean isChecked = input.isChecked();

            /*
             * Toggle the value if the enter key was pressed and the cell
             * handles selection or doesn't depend on selection. If the cell
             * depends on selection but doesn't handle selection, then ignore
             * the enter key and let the SelectionEventManager determine which
             * keys will trigger a change.
             */
            if ( enterPressed ) {
                isChecked = !isChecked;
                input.setChecked( isChecked );
            }

            /*
             * Save the new value. However, if the cell depends on the
             * selection, then do not save the value because we can get into an
View Full Code Here


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

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

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

                               ValueUpdater<Boolean> valueUpdater) {
        String type = event.getType();

        boolean enterPressed = "keydown".equals( type ) && event.getKeyCode() == KeyCodes.KEY_ENTER;
        if ( "click".equals( type ) || enterPressed ) {
            InputElement input = parent.getFirstChild().cast();
            Boolean isChecked = input.isChecked();

            /*
             * Toggle the value if the enter key was pressed and the cell handles
             * selection or doesn't depend on selection. If the cell depends on
             * selection but doesn't handle selection, then ignore the enter key and
             * let the SelectionEventManager determine which keys will trigger a
             * change.
             */
            if ( enterPressed ) {
                isChecked = !isChecked;
                input.setChecked( isChecked );
            }

            /*
             * Save the new value. However, if the cell depends on the selection, then
             * do not save the value because we can get into an inconsistent state.
View Full Code Here

                               ValueUpdater<Boolean> valueUpdater) {
        String type = event.getType();

        boolean enterPressed = "keydown".equals( type ) && event.getKeyCode() == KeyCodes.KEY_ENTER;
        if ( "change".equals( type ) || enterPressed ) {
            InputElement input = parent.getFirstChild().cast();
            Boolean isChecked = input.isChecked();

            /*
             * Toggle the value if the enter key was pressed and the cell handles
             * selection or doesn't depend on selection. If the cell depends on
             * selection but doesn't handle selection, then ignore the enter key and
             * let the SelectionEventManager determine which keys will trigger a
             * change.
             */
            if ( enterPressed ) {
                isChecked = !isChecked;
                input.setChecked( isChecked );
            }

            /*
             * Save the new value. However, if the cell depends on the selection, then
             * do not save the value because we can get into an inconsistent state.
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

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.