Package elemental.html

Examples of elemental.html.Element


  public static Element getElementById(String id) {
    return getDocument().getElementById(id);
  }

  public static void injectJs(String js) {
    Element scriptElem = createElement("script");
    scriptElem.setAttribute("language", "javascript");
    scriptElem.setTextContent(js);
    getBody().appendChild(scriptElem);
  }
View Full Code Here


   * @param id The ID of the Element that we will erase the contents of.
   * @param with The element that we will attach to the element that we just
   *        erased the contents of.
   */
  public static void replaceContents(String id, Element with) {
    Element parent = getElementById(id);
    replaceContents(parent, with);
  }
View Full Code Here

  public InputController getInput() {
    return input;
  }
 
  public void setLeftGutterVisible(boolean visible) {
    Element gutterElement = leftGutterManager.getGutter().getGutterElement();
    if (visible) {
      getView().addGutter(gutterElement);
    } else {
      getView().removeGutter(gutterElement);
    }
View Full Code Here

      this.res = res;
      this.bufferElement = bufferElement;
      this.css = res.workspaceEditorCss();

      Element rootElement = Elements.createDivElement(css.root());
      rootElement.appendChild(bufferElement);
      rootElement.appendChild(inputElement);
      setElement(rootElement);
    }
View Full Code Here

    positionController = new PositionController(positioner, listView);
  }

  private void updatePositionAndSize() {
    Element dropdownElement = listAutoHider.getView().getElement();
   
    updateWidthAndHeight(dropdownElement);
    positionController.updateElementPosition(0, 0);
  }
View Full Code Here

    updateWidthAndHeight(dropdownElement);
    positionController.updateElementPosition(0, 0);
  }

  private void updatePositionAndSizeAtCoordinates(int x, int y) {
    Element dropdownElement = listAutoHider.getView().getElement();
    // ensure we're attached to the DOM
    Elements.getBody().appendChild(dropdownElement);
    updateWidthAndHeight(dropdownElement);

    positionController.updateElementPosition(x, y);
View Full Code Here

      button.addClassName(res.baseCss().button());

      label = Elements.createDivElement(css.buttonLabel());
      button.appendChild(label);

      Element arrow = Elements.createDivElement(css.buttonArrow());
      button.appendChild(arrow);
    }
View Full Code Here

  /**
   * Sets whether or not this node has the active node styling applied.
   */
  public final void setActive(boolean isActive, Css css) {
    // Show the selection on the element returned by the node renderer
    Element selectionElement = getSelectionElement();
    CssUtils.setClassNameEnabled(selectionElement, css.active(), isActive);
    if (isActive) {
      selectionElement.focus();
    }
  }
View Full Code Here

   */
  final void closeNode(NodeDataAdapter<D> dataAdapter, Tree.Css css, AnimationController closer,
      boolean shouldAnimate) {
    ensureChildrenContainer(dataAdapter, css);

    Element expandControl = getExpandControl();

    assert (hasChildrenContainer() && CssUtils.containsClassName(expandControl,
        css.expandControl())) : "Tried to close a node that didn't have an expand control";

    setOpen(css, false);

    Element childrenContainer = getChildrenContainer();
    if (shouldAnimate) {
      closer.hide(childrenContainer);
    } else {
      closer.hideWithoutAnimating(childrenContainer);
    }
View Full Code Here

   */
  final void openNode(NodeDataAdapter<D> dataAdapter, Tree.Css css, AnimationController opener,
      boolean shouldAnimate) {
    ensureChildrenContainer(dataAdapter, css);

    Element expandControl = getExpandControl();

    assert (hasChildrenContainer() && CssUtils.containsClassName(expandControl,
        css.expandControl())) : "Tried to open a node that didn't have an expand control";

    setOpen(css, true);

    Element childrenContainer = getChildrenContainer();
    if (shouldAnimate) {     
      opener.show(childrenContainer);
    } else {
      opener.showWithoutAnimating(childrenContainer);
    }
View Full Code Here

TOP

Related Classes of elemental.html.Element

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.