Changeset 11599
- Timestamp:
- 2006-04-06T14:39:04+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r11431 r11599 44 44 import org.greenstone.gatherer.file.FileManager; 45 45 import org.greenstone.gatherer.file.FileAssociationManager; 46 import org.greenstone.gatherer.file.RecycleBin; 46 47 import org.greenstone.gatherer.gui.GUIManager; 47 48 import org.greenstone.gatherer.gui.URLField; … … 81 82 /** A public reference to the CollectionManager. */ 82 83 static public CollectionManager c_man; 84 /** A public reference to the RecycleBin. */ 85 static public RecycleBin recycle_bin; 83 86 /** a reference to the Servlet Configuration is GS3 */ 84 87 static public ServletConfiguration servlet_config; … … 394 397 // Create Collection Manager 395 398 c_man = new CollectionManager(); 399 // Create Recycle Bin 400 recycle_bin = new RecycleBin(); 396 401 397 402 if (GS3) { -
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r11598 r11599 110 110 /** Ensures that expansion and selection events between collection trees based on the same model are synchronized. */ 111 111 private TreeSynchronizer collection_tree_sync = null; 112 /** The button used to delete files, which also doubles as a drop target for files from the Trees. */113 private RecycleBin bin_button = null;114 112 /** The default size of a special mapping dialog. */ 115 113 static final Dimension DIALOG_SIZE = new Dimension(400, 120); … … 156 154 // If a user has clicked on the bin button directly remove whatever 157 155 // files are selected in the active tree. 158 if (event.getSource() == bin_button) {159 if (!bin_button.ignore()) {156 if (event.getSource() == Gatherer.recycle_bin) { 157 if (!Gatherer.recycle_bin.ignore()) { 160 158 // Find the active tree (you've made selections in). 161 159 DragTree tree = (DragTree) group.getActive(); … … 169 167 source_nodes[i] = (FileNode)(paths[i].getLastPathComponent()); 170 168 } 171 Gatherer.f_man.action(tree, source_nodes, bin_button, null);169 Gatherer.f_man.action(tree, source_nodes, Gatherer.recycle_bin, null); 172 170 } 173 171 } … … 297 295 JPanel button_pane = new JPanel(); 298 296 299 bin_button = new RecycleBin();300 bin_button.addActionListener(this);301 bin_button.setMinimumSize(MIN_SIZE);302 bin_button.setPreferredSize(MIN_SIZE);303 Dictionary.registerTooltip( bin_button, "Collection.Delete_Tooltip");304 group.add( bin_button);297 RecycleBin recycle_bin = Gatherer.recycle_bin; 298 recycle_bin.addActionListener(this); 299 recycle_bin.setMinimumSize(MIN_SIZE); 300 recycle_bin.setPreferredSize(MIN_SIZE); 301 Dictionary.registerTooltip(recycle_bin, "Collection.Delete_Tooltip"); 302 group.add(recycle_bin); 305 303 306 304 // Layout Components. … … 334 332 335 333 button_pane.add(new_folder); 336 button_pane.add( bin_button);334 button_pane.add(recycle_bin); 337 335 338 336 control_pane.setLayout(new BorderLayout()); … … 722 720 723 721 // Fire a delete action 724 Gatherer.f_man.action(tree, source_nodes, bin_button, null);722 Gatherer.f_man.action(tree, source_nodes, Gatherer.recycle_bin, null); 725 723 } 726 724 … … 778 776 source_nodes[i] = (FileNode) paths[i].getLastPathComponent(); 779 777 } 780 Gatherer.f_man.action(tree, source_nodes, bin_button, null);778 Gatherer.f_man.action(tree, source_nodes, Gatherer.recycle_bin, null); 781 779 source_nodes = null; 782 780 }
Note:
See TracChangeset
for help on using the changeset viewer.