Package com.google.gwt.dom.client

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


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

  public List<M> getChecked() {
    List<M> l = new ArrayList<M>();
    NodeList<Element> nodes = el().select(checkBoxSelector);
    for (int i = 0; i < nodes.getLength(); i++) {
      InputElement e = nodes.getItem(i).cast();
      if (e.isChecked()) {
        l.add(getStore().getAt(i));
      }
    }
    return l;
  }
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

    *
    * @param checkBox the targeted checkBox
    * @param newValue the new value, which could be retrieve through {@link CheckBox#getValue()}
    */
   public static void setCheckBoxValueSilent(CheckBox checkBox, boolean newValue) {
      InputElement inputElem = GwtReflectionUtils.getPrivateFieldValue(checkBox, "inputElem");
      inputElem.setChecked(newValue);
      inputElem.setDefaultChecked(newValue);
   }
View Full Code Here

   }

   @Test
   public void createImageInputElement() {
      // Act
      InputElement e = d.createImageInputElement();

      // Assert
      assertEquals("image", e.getType());
   }
View Full Code Here

   }

   @Test
   public void createRadioInputElement() {
      // Act
      InputElement e = d.createRadioInputElement("test");

      // Assert
      assertEquals("RADIO", e.getType());
      assertEquals("test", e.getName());
   }
View Full Code Here

      return e;
   }

   @PatchMethod
   static InputElement createCheckInputElement(Object domImpl, Document doc) {
      InputElement e = createInputElement(doc, "checkbox", null);
      e.setValue("on");

      return e;
   }
View Full Code Here

      List<Node> innerList = JsoUtils.getChildNodeInnerList(elem);
      innerList.clear();
   }

   private static InputElement createInputElement(Document doc, String type, String name) {
      InputElement e = doc.createElement("input").cast();

      e.setAttribute("type", type);

      if (name != null) {
         e.setAttribute("name", name);
      }

      return e;
   }
View Full Code Here

   }

   @Test
   public void createInputCheck() {
      // Act
      InputElement elem = InputElement.as(DOM.createInputCheck());

      // Assert
      assertEquals("input", elem.getTagName());
      assertEquals("checkbox", elem.getType());
   }
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.