Examples of ContentElement


Examples of org.waveprotocol.wave.client.editor.content.ContentElement

    try {
      DocumentContext<ContentNode, ContentElement, ContentTextNode> cxt =
        container.getContext();


      ContentElement element = child.asElement();
      if (element != null && isLineElement(element)) {
        Line line = Line.fromLineElement(element);
        assert line != null;

        // move only if there's something to move:
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.ContentElement

      nested = false;
    }
  }

  static ContentElement asParagraph(ContentNode node) {
    ContentElement e = node.asElement();
    return e != null && e.getTagName().equals(PARAGRAPH_FULL_TAGNAME) ? e : null;
  }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.ContentElement

    if (!isLineElement(firstChild)) {
      errorLogAndThrow("First child not a line element");
      return false;
    }

    ContentElement element = firstChild.asElement();
    boolean first = true;

    while (true) {
      if (line.getParagraph().getPreviousSibling() != line.getLineElement()) {
        errorLogAndThrow("Junk between line token and its paragraph");
        return false;
      }

      ContentNode node;
      for (node = line.getParagraph().getFirstChild(); node != null; node = node.getNextSibling()) {

        ContentElement e = node.asElement();
        if (e != null) {
          if (isLineElement(e)) {
            errorLogAndThrow("Line element stuck inside rendering paragraph: " + e);
            return false;
          }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.ContentElement

    for (ContentNode node = firstItem;
         node != null && node != stopAt;
         prev = node, node = view.getNextSibling(node)) {
      assert node instanceof ContentElement : "Expected node to be instance of ContentElement";
      ContentElement el = (ContentElement) node;

      int indent = Paragraph.getIndent(el);

      if (Paragraph.isHeading(el)) {
        helper.maybeCloseListItem();
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.ContentElement

  public static boolean hasListener(ContentNode node) {
    return getListener(node) != null;
  }

  private static EditModeListener getListener(ContentNode node) {
    ContentElement e = node.asElement();
    return e.asElement() != null ? e.getProperty(EDIT_MODE_LISTENER_PROP) : null;
  }
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.