Changeset 15621
- Timestamp:
- 2008-05-21T21:33:20+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/gui/CreatePane.java
r13595 r15621 606 606 } 607 607 608 /** This class serves as the listener for actions on the build button. */ 608 /** This class serves as the listener for actions on the build button. It also ensures 609 * that the log displayed is refreshed whenever the building progress display updates. */ 609 610 private class BuildButtonListener 610 implements ActionListener {611 implements ActionListener, DocumentListener { 611 612 /** 612 613 * This method checks to see what needs to be done for a build, and starts the process off. … … 676 677 document = options_pane.createNewLogDocument(); 677 678 log_textarea.setDocument(document); 679 // Add a document listener to listen to DocumentEvents emitted by the custom document. 680 // It prevents the blocks that appear in the log textarea that look like they need a refresh 681 document.addDocumentListener(this); 678 682 options_pane.log_textarea.setDocument(document); 679 683 // Change the view. … … 687 691 import_monitor.setStop(false); 688 692 } 689 } 690 693 694 695 // Called whenever the custom Document object has been updated (it then fires a DocumentEvent, handled here) 696 public void changedUpdate(DocumentEvent e) { refreshLog(); } 697 public void insertUpdate(DocumentEvent e) { refreshLog(); } 698 public void removeUpdate(DocumentEvent e) { refreshLog(); } 699 public void refreshLog() { CreatePane.this.log_textarea.repaint(); } 700 } 691 701 692 702 /** This class serves as the listener for actions on the cancel button. */
Note:
See TracChangeset
for help on using the changeset viewer.