Changeset 36255


Ignore:
Timestamp:
2022-06-13T16:32:08+12:00 (23 months ago)
Author:
kjdon
Message:

added a numTicked method

File:
1 edited

Legend:

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

    r12112 r36255  
    128128    }
    129129
     130    public int numTicked() {
     131    int count = 0;
     132    DefaultListModel model = (DefaultListModel) getModel();
     133    for (int i = 0; i < model.size(); i++) {
     134        CheckListEntry entry = (CheckListEntry) model.get(i);
     135        if (entry.isSelected()) {
     136        count ++;
     137        }
     138    }
     139    return count;
     140    }
     141   
    130142
    131143    /** This is different from isSelectionEmpty! */
Note: See TracChangeset for help on using the changeset viewer.