Пример #1
0
 public Position createBiasPosition(int offset, Position.Bias bias) throws BadLocationException {
   checkOffset(offset);
   BasePosition pos = new BasePosition();
   //        registerStack(pos);
   markVector.insert(markVector.createBiasMark(pos, offset, bias));
   return pos;
 }
Пример #2
0
  void compact() {
    if (gapLength > 0) {
      int newLength = charArray.length - gapLength;
      char[] newCharArray = new char[newLength];
      int gapEnd = gapStart + gapLength;
      System.arraycopy(charArray, 0, newCharArray, 0, gapStart);
      System.arraycopy(charArray, gapEnd, newCharArray, gapStart, charArray.length - gapEnd);
      charArray = newCharArray;
      gapStart = charArray.length;
      gapLength = 0;
    }

    markVector.compact();
  }
Пример #3
0
 @Override
 public String toString() {
   return "charArray.length=" + charArray.length + ", " + markVector.toString();
 }
Пример #4
0
 MultiMark createMark(int offset) throws BadLocationException {
   checkOffset(offset);
   return markVector.insert(markVector.createMark(offset));
 }
Пример #5
0
 MultiMark createBiasMark(int offset, Position.Bias bias) throws BadLocationException {
   checkOffset(offset);
   return markVector.insert(markVector.createBiasMark(offset, bias));
 }