Changeset 8354
- Timestamp:
- 2004-10-18T12:05:26+13:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java
r8353 r8354 441 441 public void refresh(int refresh_reason, boolean ready) 442 442 { 443 System.err.println("In EnrichPane.collectionChanged(" + ready + ")...");444 443 if (ready) { 445 TreeModel collection_model = Gatherer.c_man.getRecordSet();444 // Update label 446 445 Dictionary.registerText(collection_label, "Collection.Collection"); 447 448 // Update label coloring.449 446 collection_label.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 450 447 collection_label.setForeground(Configuration.getColor("coloring.collection_heading_foreground", false)); 451 collection_tree.setModel(collection_model); 452 453 // Update tree coloring. 448 449 // Update tree 454 450 collection_tree.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 455 451 collection_tree.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false)); 452 if (refresh_reason != CollectionManager.COLLECTION_REBUILT) { 453 collection_tree.setModel(Gatherer.c_man.getRecordSet()); 454 } 456 455 } 457 456 else { 457 // Update label 458 458 Dictionary.registerText(collection_label, "Collection.No_Collection"); 459 459 collection_label.setBackground(Color.lightGray); 460 460 collection_label.setForeground(Color.black); 461 462 // Update tree 461 463 collection_tree.setModel(new DefaultTreeModel(new DefaultMutableTreeNode(Dictionary.get("Collection.No_Collection")))); 462 464 } -
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r8353 r8354 48 48 import org.greenstone.gatherer.Dictionary; 49 49 import org.greenstone.gatherer.Gatherer; 50 import org.greenstone.gatherer.collection.CollectionManager; 50 51 import org.greenstone.gatherer.file.FileNode; 51 52 import org.greenstone.gatherer.file.FileOpenActionListener; … … 456 457 public void refresh(int refresh_reason, boolean ready) 457 458 { 458 System.err.println("In GatherPane.collectionChanged(" + ready + ")..."); 459 // Try to retrieve the collections record set. 460 collection = Gatherer.c_man.getRecordSet(); 461 if(collection != null) { 462 //args = new String[1]; 463 //args[0] = Gatherer.c_man.getCollection().getName(); 459 if (ready) { 460 // Update label 464 461 Dictionary.registerText(collection_label, "Collection.Collection"); 465 collection_tree.setModel(collection); 466 collection_tree.repaint(); 462 463 // Update tree 464 if (refresh_reason != CollectionManager.COLLECTION_REBUILT) { 465 collection_tree.setModel(Gatherer.c_man.getRecordSet()); 466 collection_tree.repaint(); 467 } 468 469 // Update filter 467 470 collection_filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 468 471 } 469 472 else { 473 // Update label 470 474 String args[] = new String[1]; 471 475 args[0] = Dictionary.get("Collection.No_Collection"); 472 476 Dictionary.registerText(collection_label, "Collection.Collection", args); 473 477 args = null; 478 479 // Update tree 474 480 collection_tree.setModel(new DefaultTreeModel(new DefaultMutableTreeNode("Error"))); 481 482 // Update filter 475 483 collection_filter.setBackground(Color.lightGray); 476 484 }
Note:
See TracChangeset
for help on using the changeset viewer.