public void updateYourself() { int tmp = historyViewModel.getSize(); for (int i = currentSize; i < tmp; i++) { this.setText( new StringBuilder(this.getText()) .append(historyViewModel.get(i)) .append("\n") .toString()); } currentSize = tmp; }
public HistoryView(HistoryViewModel historyViewModel) { this.historyViewModel = historyViewModel; historyViewModel.setHistoryView(this); setEditable(false); setAutoscrolls(true); }