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


      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

        .surfaceListAddSurfaceButtonHv().createImage(), "surface-list-add",
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            new EditView();
          }
        }), innerElement.<com.google.gwt.user.client.Element> cast());

    model.addDataObserver(this);
  }

  /**
 
View Full Code Here

          .createDivElement());
      rowElement.setClassName("surface-item-edit");

      titleTextBox = new TextBox();
      titleTextBox.setStyleName("surface-item-title");
      add(titleTextBox, rowElement.<com.google.gwt.user.client.Element> cast());
      titleTextBox.addBlurHandler(this);
      titleTextBox.addKeyPressHandler(this);

      final Element authorsElement = rowElement.appendChild(document
          .createDivElement());
View Full Code Here

      e = DOM.createSpan();
    }
    e.addClassName(style.check());
    e = (Element) node.getFirstChild().insertBefore(e, checkElement);
    checkElement.removeFromParent();
    return e.cast();
  }

  @Override
  public void onDropOver(XElement node, boolean over) {
    node.setClassName(style.dragOver(), over);
View Full Code Here

    }

    e.addClassName(style.joint());
    e = (Element) node.getFirstChild().insertBefore(e, jointElement);
    jointElement.removeFromParent();
    return e.cast();
  }

  @Override
  public void onSelect(XElement node, boolean select) {
    node.setClassName(style.selected(), select);
View Full Code Here

  public void onCheckChange(TreeNode<M> node, boolean checkable, CheckState state) {
    Element checkEl = (Element) getCheckElement(node);
    if (checkEl != null) {
      node.setCheckElement(tree.appearance.onCheckChange(node.getElement().<XElement> cast(),
          checkEl.<XElement> cast(), checkable, state));
    }
  }

  public void onDropChange(TreeNode<M> node, boolean drop) {
    XElement e = tree.getView().getElementContainer(node);
View Full Code Here

  public void onJointChange(TreeNode<M> node, Joint joint) {
    Element jointEl = getJointElement(node);
    if (jointEl != null) {
      node.setJointElement(tree.appearance.onJointChange(node.getElement().<XElement> cast(),
          jointEl.<XElement> cast(), joint, tree.getStyle()));
    }
  }

  public void onLoading(TreeNode<M> node) {
    // onIconStyleChange(node, IconHelper.createStyle("x-tree3-loading"));
View Full Code Here

    }
    TreeNode<M> node = findNode(model);
    if (node != null) {
      Element e = getElementContainer(node);
      if (e != null) {
        tree.appearance.onSelect(e.<XElement> cast(), select);
      }
    }
  }

  public void onTextChange(TreeNode<M> node, SafeHtml text) {
View Full Code Here

      // If no image element has been created yet, create one from the
      // prototype.
      DOM.appendChild(holder, proto.createElement().<Element> cast());
    } else {
      // Otherwise, simply apply the prototype to the existing element.
      proto.applyTo(child.<ImagePrototypeElement> cast());
    }
  }

  private void updateAriaAttributes() {
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.