- Timestamp:
- 2006-04-07T11:51:11+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java
r11616 r11619 134 134 JScrollPane collection_scroll = new JScrollPane(collection_tree); 135 135 136 collection_filter = Gatherer.g_man.getFilter(collection_tree);136 collection_filter = collection_tree.getFilter(); 137 137 collection_filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 138 138 collection_filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE); -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r11316 r11619 91 91 /** The size of the Gatherer window. */ 92 92 private Dimension size = null; 93 /** The filters used to dynamically filter the trees at user request. */94 private HashMap filters = new HashMap();95 93 /** The panel within the window that other components are placed on. */ 96 94 private JPanel content_pane = null; … … 444 442 Gatherer.exit(); 445 443 } 446 }447 448 449 /** Retrieve the filter, or if one already exists, spawn a linked copy. */450 public Filter getFilter(DragTree tree) {451 Filter filter = (Filter) filters.get(tree.getModel());452 if (filter == null) {453 filter = new Filter(tree, null);454 filters.put(tree.getModel(), filter);455 return filter;456 }457 return filter.spawn(tree);458 444 } 459 445 -
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r11618 r11619 224 224 workspace_scroll = new JScrollPane(workspace_tree); 225 225 226 workspace_filter = Gatherer.g_man.getFilter(workspace_tree);226 workspace_filter = workspace_tree.getFilter(); 227 227 workspace_filter.setBackground(Configuration.getColor("coloring.workspace_heading_background", false)); 228 228 workspace_filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE); … … 245 245 collection_scroll = new JScrollPane(collection_tree); 246 246 247 collection_filter = Gatherer.g_man.getFilter(collection_tree);247 collection_filter = collection_tree.getFilter(); 248 248 collection_filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 249 249 collection_filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE); -
trunk/gli/src/org/greenstone/gatherer/gui/tree/DragTree.java
r11616 r11619 17 17 import org.greenstone.gatherer.file.FileNode; 18 18 import org.greenstone.gatherer.file.FileSystemModel; 19 import org.greenstone.gatherer.gui.Filter; 19 20 import org.greenstone.gatherer.util.DragComponent; 20 21 import org.greenstone.gatherer.util.DragGroup; … … 31 32 /** The Group this component belongs to. */ 32 33 private DragGroup group; 34 /** The filter for this tree. */ 35 private Filter filter = null; 33 36 /** The image to use for the disabled background. */ 34 37 private ImageIcon disabled_background; … … 88 91 // Init 89 92 this.name = name; 93 this.filter = new Filter(this, null); 90 94 91 95 // Creation … … 454 458 } 455 459 460 public Filter getFilter() { 461 return filter; 462 } 463 456 464 public String getSelectionDetails() { 457 465 return ((DragTreeSelectionModel)selectionModel).getDetails();
Note:
See TracChangeset
for help on using the changeset viewer.