Пример #1
0
  private void clearBuffer() {
    if (!myTerminalTextBuffer.isUsingAlternateBuffer()) {
      myTerminalTextBuffer.clearHistory();

      if (myCoordsAccessor != null && myCoordsAccessor.getY() > 0) {
        TerminalLine line = myTerminalTextBuffer.getLine(myCoordsAccessor.getY() - 1);

        myTerminalTextBuffer.clearAll();

        myCoordsAccessor.setY(0);
        myCursor.setY(1);
        myTerminalTextBuffer.addLine(line);
      }

      updateScrolling();

      myClientScrollOrigin = myBoundedRangeModel.getValue();
    }
  }
Пример #2
0
 private void moveScrollBar(int k) {
   myBoundedRangeModel.setValue(myBoundedRangeModel.getValue() + k);
 }