Package org.waveprotocol.wave.client.editor.content

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


      // Flush because the selection location may have changed to somewhere
      // else in the same text node. We MUST handle mouse down events for
      // this.
      editorInteractor.forceFlush();
      ContentElement node = editorInteractor.findElementWrapper(event.getTarget());
      event.setCaret(new ContentPoint(node, null));
      if (node != null && event.isClickEvent()) {
        router.handleClick(node, event);
        editorInteractor.clearCaretAnnotations();
        editorInteractor.rebiasSelection(CursorDirection.NEUTRAL);
        return !event.shouldAllowBrowserDefault();
View Full Code Here


        || (next.asElement() != null && LineRendering.isLineElement(next.asElement()));
  }

  @Override
  public boolean handleEnter(ContentElement element, EditorEvent event) {
    ContentPoint contentPoint = event.getCaret();
    if (!contentPoint.isInTextNode() && contentPoint.getContainer() != element) {
      return true;
    }
    Point<ContentNode> point = contentPoint.asPoint();
    ContentNode nodeBefore = point.isInTextNode()
        ? point.getContainer() : Point.nodeBefore(FullContentView.INSTANCE, point.asElementPoint());
    Line line = Line.fromParagraph(element);

    // If user hits enter at the an empty list item - we de-indent or stop the list
View Full Code Here

      // Flush because the selection location may have changed to somewhere
      // else in the same text node. We MUST handle mouse down events for
      // this.
      editorInteractor.forceFlush();
      ContentElement node = editorInteractor.findElementWrapper(event.getTarget());
      event.setCaret(new ContentPoint(node, null));
      if (node != null && event.isClickEvent()) {
        router.handleClick(node, event);
        editorInteractor.clearCaretAnnotations();
        editorInteractor.rebiasSelection(CursorDirection.NEUTRAL);
        return !event.shouldAllowBrowserDefault();
View Full Code Here

        || (next.asElement() != null && LineRendering.isLineElement(next.asElement()));
  }

  @Override
  public boolean handleEnter(ContentElement element, EditorEvent event) {
    ContentPoint contentPoint = event.getCaret();
    if (!contentPoint.isInTextNode() && contentPoint.getContainer() != element) {
      return true;
    }
    Point<ContentNode> point = contentPoint.asPoint();
    ContentNode nodeBefore = point.isInTextNode()
        ? point.getContainer() : Point.nodeBefore(FullContentView.INSTANCE, point.asElementPoint());
    Line line = Line.fromParagraph(element);

    // If user hits enter at the an empty list item - we de-indent or stop the list
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.editor.content.ContentPoint

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.