- Timestamp:
- 2003-07-15T13:55:22+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/checklist/CheckList.java
r4572 r4932 219 219 private class CheckListListener 220 220 extends MouseAdapter { 221 221 222 //private Entry previous_checkbox = null; 222 223 /** Called whenever the mouse is clicked over our list. We find the nearest checkbox and change its state. … … 227 228 int index = list.locationToIndex(e.getPoint()); 228 229 Entry checkbox = (Entry)list.getModel().getElementAt(index); 229 // If this is the same checkbox as was recently selected, change the tick. 230 if (list.isSelectedIndex(index)) { 231 if(!checkbox.isFixed()) { 232 checkbox.setSelected(!checkbox.isSelected()); 233 } 234 checkbox.grabFocus(); 235 } 236 /* 237 if(list.isSelectedIndex(index) && checkbox == previous_checkbox) { 238 if(!checkbox.isFixed()) { 239 checkbox.setSelected(!checkbox.isSelected()); 240 } 241 checkbox.grabFocus(); 242 } 243 // Otherwise the selection has just changed, so select the new checkbox 244 else if(list.isSelectedIndex(index)) { 245 previous_checkbox = checkbox; 246 } 247 else { 248 previous_checkbox = null; 249 } 250 */ 230 if(!checkbox.isFixed()) { 231 checkbox.setSelected(!checkbox.isSelected()); 232 } 233 checkbox.grabFocus(); 251 234 } 252 235 }
Note:
See TracChangeset
for help on using the changeset viewer.