Пример #1
0
    public void resize(int columns) {
      if (columns > myWidth) {
        for (int i = myTabLength * (myWidth / myTabLength); i < columns; i += myTabLength) {
          if (i >= myWidth) {
            myTabStops.add(i);
          }
        }
      } else {
        Iterator<Integer> it = myTabStops.iterator();
        while (it.hasNext()) {
          int i = it.next();
          if (i > columns) {
            it.remove();
          }
        }
      }

      myWidth = columns;
    }
Пример #2
0
 @Override
 public void setTabStop(int position) {
   myTabStops.add(Integer.valueOf(position));
 }
Пример #3
0
 private void initTabStops(int columns, int tabLength) {
   for (int i = tabLength; i < columns; i += tabLength) {
     myTabStops.add(i);
   }
 }