Examples of ContentView


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

    //    redoing it
    // 2. It blatantly disregards transparent nodes. It should "work" with them
    //    around, but it might mess them up.
    // 3. The code is too complicated

    ContentView renderedContent = renderedView;

    assert end == null || end.getContainer() == start.getContainer() :
        "No reverting across elements";

    ContentNode before = Point.nodeBefore(renderedContent, start);
    Node nodeletBefore = before == null ? null : before.getImplNodelet();
    Element parentNodelet;
    if (nodeletBefore == null) {
      parentNodelet = renderedContent.getVisibleNode(start.getContainer()).getImplNodelet().cast();
    } else {
      parentNodelet = nodeletBefore.getParentElement();
    }

    ContentNode first = start.getNodeAfter();
    ContentNode last = end == null ? null : end.getNodeAfter();
    assert renderedContent.getVisibleNode(first) == first;
    assert renderedContent.getVisibleNode(last) == last;
    assert last == null
        || renderedContent.getParentElement(first) == renderedContent.getParentElement(last)
        : "First and last are expected to have same parent";
    {
      ContentNode node;
      for (node = first; node != last; node = renderedContent.getNextSibling(node)) {
        // If node is consistent, we assume the ones after are ok.
        if (end == null && node.isConsistent()) {
          break;
        }
View Full Code Here

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

    // problem is that we can't always safely force the typing extractor to
    // extract out those operations. Therefore, we assume that most of the time,
    // doodads are inserted via selection on a non-editing document.
    ContentRange selectionPoints = createSelectionHelper(content).getOrderedSelectionPoints();
    CMutableDocument document = content.getMutableDoc();
    ContentView view = content.getPersistentView();
    return DocumentUtil.getLocationNearSelection(document, view, selectionPoints);
  }
View Full Code Here

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

  /**
   * {@inheritDoc}
   */
  @Override
  public void assertHealthy(ContentElement paragraph) {
    ContentView renderedContent = paragraph.getRenderedContentView();
    if (renderedContent.getFirstChild(paragraph) != null) {
      Node child =
        paragraph.getImplNodelet().getFirstChild();
      while (child != null) {
        assert !isSpacer(child) : "Non-empty paragraph should not have spacer";
        child = child.getNextSibling();
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.