예제 #1
0
 void finishConversion(File outFile, Date start) {
   isBusy = false;
   progressBar.setIndeterminate(false);
   Date end = new Date();
   textArea.append(
       format("Created %s in %s ms.%n", outFile.getPath(), end.getTime() - start.getTime()));
   JScrollBar scrollBar = scrollPane.getVerticalScrollBar();
   scrollBar.setValue(scrollBar.getMaximum());
 }
예제 #2
0
 public void setScrollPane(JScrollPane parent) {
   this.parent = parent;
   JScrollBar jsb = parent.getVerticalScrollBar();
   jsb.addAdjustmentListener(
       new AdjustmentListener() {
         @Override
         public void adjustmentValueChanged(AdjustmentEvent ae) {
           if (!ae.getValueIsAdjusting() && autoscroll) {
             jsb.setValue(jsb.getMaximum());
           }
         }
       });
 }