Package com.google.collide.client.editor.selection

Examples of com.google.collide.client.editor.selection.SelectionModel.deselect()


      /*
       * TODO: the cursor will be the last line in the viewport,
       * fix this
       */
      SelectionModel selectionModel = getSelection();
      selectionModel.deselect();
      selectionModel.setCursorPosition(lineInfo, column);
    }
  }

  public void cleanup() {
View Full Code Here


        getInputController().prepareForCopy();
        Position[] selectionRange = selectionModel.getSelectionRange(true);
        clipboard =
            LineUtils.getText(selectionRange[0].getLine(), selectionRange[0].getColumn(),
                selectionRange[1].getLine(), selectionRange[1].getColumn());
        selectionModel.deselect();
        switchMode(Modes.COMMAND);
        return false;
      }
    });
View Full Code Here

    });
  }

  private void startNewLine(Editor editor) {
    SelectionModel selection = editor.getSelection();
    selection.deselect();
    Line line = selection.getCursorLine();
    int lineNumber = selection.getCursorLineNumber();
    int lastCursorColumn = LineUtils.getLastCursorColumn(line);
    selection.setCursorPosition(new LineInfo(line, lineNumber), lastCursorColumn);
    editor.getEditorDocumentMutator().insertText(line, lineNumber, lastCursorColumn, "\n");
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.