Changeset 5157 for trunk/gli/src/org/greenstone/gatherer/collection
- Timestamp:
- 2003-08-18T14:00:55+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java
r4678 r5157 43 43 import org.greenstone.gatherer.Gatherer; 44 44 import org.greenstone.gatherer.collection.Collection; 45 import org.greenstone.gatherer.collection.CollectionManager; 45 46 import org.greenstone.gatherer.gui.ModalDialog; 46 47 import org.greenstone.gatherer.gui.SimpleMenuBar; 47 48 import org.greenstone.gatherer.util.ArrayTools; 48 49 import org.greenstone.gatherer.util.GSDLSiteConfig; 50 import org.greenstone.gatherer.util.StaticStrings; 49 51 import org.greenstone.gatherer.util.Utility; 50 52 /** This class provides the functionality to delete current collections from the GSDLHOME/collect/ directory. The user chooses the collection from a list, where each entry also displays details about itself, confirms the delete of a collection by checking a checkbox then presses the ok button to actually delete the collection. … … 117 119 /** Destructor. */ 118 120 public void destroy() { 121 list_model.clear(); 122 list_model = null; 119 123 close_button = null; 120 124 confirmation = null; 121 125 details = null; 122 126 details_label = null; 123 list_model.clear();124 list_model = null;125 127 list = null; 126 128 ok_button = null; … … 216 218 ArrayTools.sort(collections); 217 219 for(int i = 0; collections != null && i < collections.length; i++) { 218 File config_file = Utility.findConfigFile(collections[i]); 219 if (config_file != null) { 220 CollectionConfiguration config = new CollectionConfiguration(config_file); 221 if (config != null) { 222 CollectionEntry col = new CollectionEntry(collections[i].getName(), config); 223 list_model.addElement(col); 224 } 220 if(!collections[i].getName().equals(StaticStrings.MODEL_COLLECTION_NAME)) { 221 File config_file = Utility.findConfigFile(collections[i]); 222 if (config_file != null) { 223 CollectionConfiguration config = new CollectionConfiguration(config_file); 224 if (config != null) { 225 CollectionEntry col = new CollectionEntry(collections[i].getName(), config); 226 list_model.addElement(col); 227 } 228 } 225 229 } 226 230 } … … 235 239 */ 236 240 public void actionPerformed(ActionEvent event) { 241 // Ask the collection manager to refresh the 'Greenstone Collections' folder 242 Gatherer.c_man.refreshGreenstoneCollections(); 243 // Done 237 244 prompt.dispose(); 238 245 } … … 243 250 implements ListSelectionListener { 244 251 /** Any implementation of ListSelectionListener must include this method so we can be informed when the list selection changes. 245 * @param event A <strong>ListSelectionEvent</strong> containing all the relevant information garnered from the event itself.246 252 * @param event a <strong>ListSelectionEvent</strong> containing all the relevant information garnered from the event itself 253 */ 247 254 public void valueChanged(ListSelectionEvent event) { 255 ok_button.setEnabled(false); 256 confirmation.setSelected(false); 248 257 if(!list.isSelectionEmpty()) { 249 258 confirmation.setEnabled(true);
Note:
See TracChangeset
for help on using the changeset viewer.