Changeset 1057


Ignore:
Timestamp:
Jun 14, 2011, 11:56:27 PM (6 years ago)
Author:
stefan
Message:

javadoc

Location:
trunk/src/sce/component
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sce/component/SCECaret.java

    r969 r1057  
    7676   *
    7777   * @param direction a direction constant
    78    */
    79   public void move(int direction, boolean selection) {
    80     if (direction == DIRECTION_UP) moveToVirt(getRow() - 1, virtualColumn, selection, false);
    81     if (direction == DIRECTION_DOWN) moveToVirt(getRow() + 1, virtualColumn, selection, false);
     78   * @param keepSelection keep selection?
     79   */
     80  public void move(int direction, boolean keepSelection) {
     81    if (direction == DIRECTION_UP) moveToVirt(getRow() - 1, virtualColumn, keepSelection, false);
     82    if (direction == DIRECTION_DOWN) moveToVirt(getRow() + 1, virtualColumn, keepSelection, false);
    8283    if (direction == DIRECTION_LEFT) {
    8384      if (getColumn() == 0 && getRow() > 0) {
    84         moveTo(getRow() - 1, document.getRowLength(getRow() - 1), selection);
     85        moveTo(getRow() - 1, document.getRowLength(getRow() - 1), keepSelection);
    8586      } else {
    86         moveTo(getRow(), getColumn() - 1, selection);
     87        moveTo(getRow(), getColumn() - 1, keepSelection);
    8788      }
    8889    }
    8990    if (direction == DIRECTION_RIGHT) {
    9091      if (getColumn() == document.getRowLength(getRow()) && getRow() < document.getRowsCount() - 1) {
    91         moveTo(getRow() + 1, 0, selection);
     92        moveTo(getRow() + 1, 0, keepSelection);
    9293      } else {
    93         moveTo(getRow(), getColumn() + 1, selection);
     94        moveTo(getRow(), getColumn() + 1, keepSelection);
    9495      }
    9596    }
    96 
    9797  }
    9898
     
    102102   * @param row    the row
    103103   * @param column the column
     104   * @param keepSelection keep selection?
    104105   */
    105106  public void moveTo(int row, int column, boolean keepSelection) {
     
    111112   *
    112113   * @param pos position
     114   * @param keepSelection keep selection
    113115   */
    114116  public void moveTo(SCEPosition pos, boolean keepSelection) {
     
    119121   * Moves the caret to the specified position.
    120122   *
    121    * @param row                 the row
    122    * @param column              the column
     123   * @param row                 row
     124   * @param column              column
     125   * @param keepSelection       keep selection?
    123126   * @param updateVirtualColumn true, if the virtual column should be updated
    124127   */
  • trunk/src/sce/component/SCEDocument.java

    r1009 r1057  
    66
    77import jlatexeditor.gproperties.GProperties;
     8import org.jetbrains.annotations.Nullable;
    89import sce.codehelper.WordWithPos;
    910
     
    266267   * @param end   the selection end
    267268   */
    268   public void setSelectionRange(SCEDocumentPosition start, SCEDocumentPosition end) {
     269  public void setSelectionRange(@Nullable SCEDocumentPosition start, @Nullable SCEDocumentPosition end) {
    269270    if (start == null || end == null) {
    270271      selectionStart = null;
Note: See TracChangeset for help on using the changeset viewer.