Changeset 9200


Ignore:
Timestamp:
2005-02-25T17:22:07+13:00 (19 years ago)
Author:
mdewsnip
Message:

Changed some function names in CheckList to be more obvious (well, to me, anyway).

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java

    r9161 r9200  
    744744        source_list.clearSelection();
    745745        ArrayList sources = selected_index.getSources();
    746         source_list.setSelectedObjects(sources.toArray());
     746        source_list.setTickedObjects(sources.toArray());
    747747       
    748748    }
     
    758758        }
    759759        // Can't add a new index if no sources are selected
    760         else if (source_list.getSelected().size() == 0) {
     760        else if (source_list.isNothingTicked()) {
    761761        add_enabled = false;
    762762        }
    763763        // If we get this far, create a dummy index and see if it's already assigned in the collection
    764764        else {
    765         Object object[] = source_list.getSelected().toArray();
     765        Object object[] = source_list.getTicked().toArray();
    766766        ArrayList sources = new ArrayList();
    767767        for(int i = 0; i < object.length; i++) {
     
    806806        {
    807807        String name = name_textfield.getText();
    808         if (source_list.getSelected().size() > 0 && name.length() != 0) {
    809             ArrayList sources = source_list.getSelected();
     808        if (!source_list.isNothingTicked() && name.length() != 0) {
     809            ArrayList sources = source_list.getTicked();
    810810            Index index = new Index(level_combobox.getSelectedIndex(), sources);
    811811
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java

    r9161 r9200  
    409409
    410410        // Display the selected subcollection index's sources
    411         source_list.clearSelection();
    412         source_list.setSelectedObjects(selected_index.getSources().toArray());
     411        source_list.clearTicked();
     412        source_list.setTickedObjects(selected_index.getSources().toArray());
    413413    }
    414414
     
    424424        }
    425425        // Can't add a new index if no sources are selected
    426         else if (source_list.getSelected().size() == 0) {
     426        else if (source_list.isNothingTicked()) {
    427427        add_enabled = false;
    428428        }
    429429        // If we get this far, create a dummy index and see if it's already assigned in the collection
    430430        else {
    431         ArrayList sources = source_list.getSelected();
     431        ArrayList sources = source_list.getTicked();
    432432        SubcollectionIndex subcollection_index = new SubcollectionIndex(sources.toArray());
    433433
     
    468468        {
    469469        String name = subcollection_index_name_textfield.getText();
    470         if (source_list.getSelected().size() > 0 && name.length() != 0) {
    471             ArrayList sources = source_list.getSelected();
     470        if (!source_list.isNothingTicked() && name.length() != 0) {
     471            ArrayList sources = source_list.getTicked();
    472472            SubcollectionIndex subcollection_index = new SubcollectionIndex(sources.toArray());
    473473
  • trunk/gli/src/org/greenstone/gatherer/gui/ExportCollectionPrompt.java

    r9196 r9200  
    448448        ///ystem.err.println("OK Clicked");
    449449        // Make sure there are some colls specified
    450         selected_collections = list.getSelected();
     450        selected_collections = list.getTicked();
    451451        error_message = new StringBuffer();
    452452       
  • trunk/gli/src/org/greenstone/gatherer/util/CheckList.java

    r9196 r9200  
    8888
    8989
    90     public void clearSelection()
     90    public void clearTicked()
    9191    {
    9292    DefaultListModel model = (DefaultListModel) getModel();
     
    102102     * @see org.greenstone.gatherer.checklist.Entry
    103103     */
    104     public ArrayList getSelected()
     104    public ArrayList getTicked()
    105105    {
    106106    ArrayList result = new ArrayList();
     
    148148
    149149
    150     public void setSelectedObjects(Object objects[])
     150    public void setTickedObjects(Object[] objects)
    151151    {
    152152    if (objects == null) {
Note: See TracChangeset for help on using the changeset viewer.