Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.Element.cast()


      } else {
        while (insertBefore != null
            && table.tableBuilder.getRowValueIndex(insertBefore) < absEndIndex) {
          Element next = insertBefore.getNextSiblingElement();
          section.removeChild(insertBefore);
          insertBefore = (next == null) ? null : next.<TableRowElement> cast();
        }
      }

      // Add new child elements.
      TableSectionElement newSection = convertToSectionElement(table, section.getTagName(), html);
View Full Code Here


        // 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");
View Full Code Here

        // 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");
View Full Code Here

   * @param id the id of the element to be found
   * @return the element with the given id, or <code>null</code> if none is found
   */
  public com.google.gwt.user.client.Element getElementById(String id) {
    Element elem = isAttached() ? Document.get().getElementById(id) : attachToDomAndGetElement(id);
    return elem.cast();
  }

  /**
   * Performs a {@link DOM#getElementById(String)} after attaching the panel's
   * element into a hidden DIV in the document's body. Attachment is necessary
View Full Code Here

      Element elem = ns[i];
      elem.getStyle().setProperty("width", tw);

      elem = elem.getFirstChildElement();
      elem.getStyle().setProperty("width", tw);
      TableSectionElement section = elem.cast();
      Element row = section.getRows().getItem(0);

      for (int j = 0; j < clen; j++) {
        Element cell = row.getChildNodes().getItem(j).cast();
        cell.getStyle().setProperty("width", "" + ws.get(j));
View Full Code Here

   * @param id the id of the element to be found
   * @return the element with the given id, or <code>null</code> if none is found
   */
  public com.google.gwt.user.client.Element getElementById(String id) {
    Element elem = isAttached() ? Document.get().getElementById(id) : attachToDomAndGetElement(id);
    return elem.cast();
  }

  /**
   * Performs a {@link DOM#getElementById(String)} after attaching the panel's
   * element into a hidden DIV in the document's body. Attachment is necessary
View Full Code Here

        }

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

      cellParent.setTabIndex(-1);
      cellParent.removeAttribute("tabIndex");
      cellParent.removeAttribute("accessKey");
    } else {
      FocusImpl focusImpl = FocusImpl.getFocusImplForWidget();
      com.google.gwt.user.client.Element cellElem = cellParent.cast();
      focusImpl.setTabIndex(cellElem, tree.getTabIndex());
      char accessKey = tree.getAccessKey();
      if (accessKey != 0) {
        focusImpl.setAccessKey(cellElem, accessKey);
      }
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.