textchange.java

来自「自己建立的项目」· Java 代码 · 共 56 行

JAVA
56
字号
package com.swtSample.text;

/**
 * This class contains a single change, used for Undo processing
 */
public class TextChange {
  // The starting offset of the change
  private int start;

  // The length of the change
  private int length;

  // The replaced text
  String replacedText;

  /**
   * Constructs a TextChange
   * 
   * @param start the starting offset of the change
   * @param length the length of the change
   * @param replacedText the text that was replaced
   */
  public TextChange(int start, int length, String replacedText) {
    this.start = start;
    this.length = length;
    this.replacedText = replacedText;
  }

  /**
   * Returns the start
   * 
   * @return int
   */
  public int getStart() {
    return start;
  }

  /**
   * Returns the length
   * 
   * @return int
   */
  public int getLength() {
    return length;
  }

  /**
   * Returns the replacedText
   * 
   * @return String
   */
  public String getReplacedText() {
    return replacedText;
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?