Changeset 4572
- Timestamp:
- 2003-06-11T15:50:04+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/checklist/CheckList.java
r4496 r4572 219 219 private class CheckListListener 220 220 extends MouseAdapter { 221 private Entry previous_checkbox = null;221 //private Entry previous_checkbox = null; 222 222 /** Called whenever the mouse is clicked over our list. We find the nearest checkbox and change its state. 223 223 * @param e A <strong>MouseEvent</strong> containing everything you ever wanted to know about the mouse event but were afraid to ask. … … 227 227 int index = list.locationToIndex(e.getPoint()); 228 228 Entry checkbox = (Entry)list.getModel().getElementAt(index); 229 230 if (list.isSelectedIndex(index) && checkbox == previous_checkbox) {229 // If this is the same checkbox as was recently selected, change the tick. 230 if (list.isSelectedIndex(index)) { 231 231 if(!checkbox.isFixed()) { 232 232 checkbox.setSelected(!checkbox.isSelected()); … … 234 234 checkbox.grabFocus(); 235 235 } 236 // Otherwise the selection has just changed, so select the new checkbox 237 else if(list.isSelectedIndex(index)) { 238 previous_checkbox = checkbox; 239 } 240 else { 241 previous_checkbox = null; 242 } 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 */ 243 251 } 244 252 }
Note:
See TracChangeset
for help on using the changeset viewer.