- Timestamp:
- 2008-03-29T18:21:07+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/gui/DeleteCollectionPrompt.java
r14045 r15156 251 251 confirmation.setSelected(false); 252 252 if(!list.isSelectionEmpty()) { 253 confirmation.setEnabled(true);254 253 collection = (BasicCollectionConfiguration) list.getSelectedValue(); 255 args = new String[3]; 256 args[0] = collection.getCreator(); 257 args[1] = collection.getMaintainer(); 258 args[2] = collection.getDescription(); 259 details.setText(Dictionary.get("DeleteCollectionPrompt.Details", args)); 260 details.setCaretPosition(0); 254 255 String currentColName = (Gatherer.c_man.getCollection() == null) ? "" : Gatherer.c_man.getCollection().getName(); 256 if(!collection.getShortName().equals(currentColName)) { 257 // the selected collection can only be deleted if it is NOT the collection that is currently open 258 confirmation.setEnabled(true); 259 confirmation.setToolTipText(null); // no tooltip 260 ok_button.setToolTipText(null); 261 262 args = new String[3]; 263 args[0] = collection.getCreator(); 264 args[1] = collection.getMaintainer(); 265 args[2] = collection.getDescription(); 266 details.setText(Dictionary.get("DeleteCollectionPrompt.Details", args)); 267 details.setCaretPosition(0); 268 } else { // trying to delete the collection that is open at present 269 // add a tooltip saying to the confirmation checkbox saying that the current collection can't be deleted 270 String tooltip = Dictionary.get("DeleteCollectionPrompt.Cannot_Delete_Open_Collection_Tooltip", 271 collection.getName()); 272 confirmation.setToolTipText(tooltip); 273 ok_button.setToolTipText(tooltip); 274 // delete/ok button and confirmation checkbox should be disabled 275 ok_button.setEnabled(false); 276 confirmation.setEnabled(false); 277 confirmation.setSelected(false); 278 } 261 279 } 262 280 else {
Note:
See TracChangeset
for help on using the changeset viewer.