Changeset 4572


Ignore:
Timestamp:
2003-06-11T15:50:04+12:00 (21 years ago)
Author:
kjdon
Message:

checklist is now a single click list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/checklist/CheckList.java

    r4496 r4572  
    219219    private class CheckListListener
    220220    extends MouseAdapter {
    221     private Entry previous_checkbox = null;
     221    //private Entry previous_checkbox = null;
    222222    /** Called whenever the mouse is clicked over our list. We find the nearest checkbox and change its state.
    223223     * @param e A <strong>MouseEvent</strong> containing everything you ever wanted to know about the mouse event but were afraid to ask.
     
    227227        int index = list.locationToIndex(e.getPoint());
    228228        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) && checkbox == previous_checkbox) {
     229        // If this is the same checkbox as was recently selected, change the tick.
     230        if (list.isSelectedIndex(index)) {
    231231        if(!checkbox.isFixed()) {
    232232            checkbox.setSelected(!checkbox.isSelected());
     
    234234        checkbox.grabFocus();
    235235        }
    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        */
    243251    }
    244252    }
Note: See TracChangeset for help on using the changeset viewer.