Changeset 8590


Ignore:
Timestamp:
2004-11-18T09:55:22+13:00 (19 years ago)
Author:
mdewsnip
Message:

Renamed checklist/Entry.java to checklist/CheckListEntry.java.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
1 added
1 deleted
6 edited

Legend:

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

    r8496 r8590  
    3737import org.greenstone.gatherer.Gatherer;
    3838import org.greenstone.gatherer.checklist.CheckList;
    39 import org.greenstone.gatherer.checklist.Entry;
     39import org.greenstone.gatherer.checklist.CheckListEntry;
    4040import org.greenstone.gatherer.collection.BasicCollectionConfiguration;
    4141import org.greenstone.gatherer.util.StaticStrings;
     
    163163        int size = collection_checklist_model.size();
    164164        for(int i = 0; i < size; i++) {
    165         Entry entry = (Entry) collection_checklist_model.get(i);
     165        CheckListEntry entry = (CheckListEntry) collection_checklist_model.get(i);
    166166        if(entry.isSelected()) {
    167167            String collection_name = (String) entry.getProperty();
     
    224224
    225225            // The current collection is always selected.
    226             Entry entry = new Entry(collection_title);
     226            CheckListEntry entry = new CheckListEntry(collection_title);
    227227            entry.setProperty(collection_name);
    228228            entry.setSelected(getSuperCollection(collection_name) != null || collection_name.equals(current_coll_name));
  • trunk/gli/src/org/greenstone/gatherer/checklist/CheckList.java

    r8496 r8590  
    6363    this.show_selected_row = show_selected_row;
    6464
    65     setCellRenderer(new CellRenderer());
     65    setCellRenderer(new CheckListCellRenderer());
    6666    setModel(new DefaultListModel());
    6767    setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     
    7070
    7171
    72     public void addEntry(Entry entry)
     72    public void addEntry(CheckListEntry entry)
    7373    {
    7474    DefaultListModel model = (DefaultListModel) getModel();
     
    9292    DefaultListModel model = (DefaultListModel) getModel();
    9393    for (int i = 0; i < model.size(); i++) {
    94         ((Entry) model.get(i)).setSelected(false);
     94        ((CheckListEntry) model.get(i)).setSelected(false);
    9595    }
    9696    updateUI();
     
    107107    DefaultListModel model = (DefaultListModel) getModel();
    108108    for (int i = 0; i < model.size(); i++) {
    109         Entry entry = (Entry) model.get(i);
     109        CheckListEntry entry = (CheckListEntry) model.get(i);
    110110        if (entry.isSelected()) {
    111111        result.add(entry.getObject());
     
    114114    return result;
    115115    }
    116 
    117 
    118 //     public boolean isSelectionEmpty()
    119 //     {
    120 //  System.err.println("In CheckList.isSelectionEmpty()...");
    121 //  DefaultListModel model = (DefaultListModel) getModel();
    122 //  for (int i = 0; i < model.size(); i++) {
    123 //      Entry entry = (Entry) model.get(i);
    124 //      if (entry.isSelected()) {
    125 //      return false;
    126 //      }
    127 //  }
    128 
    129 //  return true;
    130 //     }
    131116
    132117
     
    139124    for (int i = 0; i < list_data.size(); i++) {
    140125        Object list_object = list_data.get(i);
    141         if (list_object instanceof Entry) {
    142         addEntry((Entry) list_object);
     126        if (list_object instanceof CheckListEntry) {
     127        addEntry((CheckListEntry) list_object);
    143128        }
    144129        else {
    145         addEntry(new Entry(list_object));
     130        addEntry(new CheckListEntry(list_object));
    146131        }
    147132    }
     
    157142    DefaultListModel model = (DefaultListModel) getModel();
    158143    for (int i = 0; i < model.size(); i++) {
    159         Entry entry = (Entry) model.get(i);
     144        CheckListEntry entry = (CheckListEntry) model.get(i);
    160145        for (int j = 0; j < objects.length; j++) {
    161146        if (entry.getObject().equals(objects[j])) {
     
    174159
    175160    /** A custom list cell renderer for producing rows which contain clickable check boxes. */
    176     protected class CellRenderer
     161    protected class CheckListCellRenderer
    177162    implements ListCellRenderer {
    178163
     
    216201        JList list = (JList) e.getSource();
    217202        int index = list.locationToIndex(e.getPoint());
    218         Entry checkbox = (Entry)list.getModel().getElementAt(index);
     203        CheckListEntry checkbox = (CheckListEntry)list.getModel().getElementAt(index);
    219204        if(!checkbox.isFixed()) {
    220205        checkbox.setSelected(!checkbox.isSelected());
  • trunk/gli/src/org/greenstone/gatherer/collection/ExportCollectionPrompt.java

    r8496 r8590  
    4848import org.greenstone.gatherer.Gatherer;
    4949import org.greenstone.gatherer.checklist.CheckList;
    50 import org.greenstone.gatherer.checklist.Entry;
     50import org.greenstone.gatherer.checklist.CheckListEntry;
    5151import org.greenstone.gatherer.gui.GLIButton;
    5252import org.greenstone.gatherer.gui.ModalDialog;
     
    419419        ok_button.setEnabled(false);
    420420        if(!list.isSelectionEmpty()) {
    421         collection = (BasicCollectionConfiguration) ((Entry)list.getSelectedValue()).getObject();
     421        collection = (BasicCollectionConfiguration) ((CheckListEntry)list.getSelectedValue()).getObject();
    422422        args = new String[5];
    423423        args[0] = collection.getName();
  • trunk/gli/src/org/greenstone/gatherer/gems/GEMSPreferences.java

    r8581 r8590  
    4242import org.greenstone.gatherer.cdm.PlugInManager;
    4343import org.greenstone.gatherer.checklist.CheckList;
    44 import org.greenstone.gatherer.checklist.Entry;
    4544import org.greenstone.gatherer.collection.Collection;
    4645import org.greenstone.gatherer.gui.tree.DragTree;
  • trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java

    r8353 r8590  
    6161
    6262/** This class provides a GUI view showing some statistics on your current collection, and options for building it. As the collection is built this initial view is replaced with one showing progress bars and a message log of the creation process. This log can be later accessed via the options tree located in the center of the initial pane. This class is also responsible for creating the GShellProgressMonitors that are then attatched to external shell processes, and calling the methods in the CollectionManager for actually importing and building the collection. <br><BR>
    63  * <center><table width=80% border=2 cellspacing=0 cellpadding=2><tr><td align=center colspan=4>
    64  * The (i)mport and/or (b)uild options supported:</td></tr>
    65  * <tr background=black><font color=white><td>Script</td><td>Associated Argument</td><td>Control</td><td>Comments</td></font></tr>
    66  * <tr><td>b</td><td>-allclassifications</td><td>JCheckBox</td><td>&nbsp;</td></tr>
    67  * <tr><td>i/b</td><td>-archivedir</td><td>JTextField</td><td>&nbsp;</td></tr>
    68  * <tr><td>b</td><td>-builddir</td><td>JTextField</td><td>&nbsp;</td></tr>
    69  * <tr><td>i/b</td><td>-debug</td><td>JCheckBox</td><td>&nbsp;</td></tr>
    70  * <tr><td>i/b</td><td>-collectdir</td><td>JTextField</td><td>&nbsp;</td></tr>
    71  * <tr><td>b</td><td>-create_images</td><td>JCheckBox</td><td>&nbsp;</td></tr>
    72  * <tr><td>i</td><td>-groupsize</td><td>JSpinner </td><td>&nbsp;</td></tr>
    73  * <tr><td>i</td><td>-gzip</td><td>JCheckBox</td><td>&nbsp;</td></tr>
    74  * <tr><td>i</td><td>-importdir</td><td>JTextField</td><td>&nbsp;</td></tr>
    75  * <tr><td>b</td><td>-index</td><td>GCheckList</td><td>&nbsp;</td></tr>
    76  * <tr><td>i/b</td><td>-keepold</td><td>JCheckBox</td><td>sanity check removeold</td></tr>
    77  * <tr><td>i/b</td><td>-maxdocs</td><td>JSpinner</td><td>&nbsp;</td></tr>
    78  * <tr><td>b</td><td>-mode</td><td>JComboBox</td><td>"all", "compress_text", "infodb", "build_index"</td></tr>
    79  * <tr><td>b</td><td>-no_text</td><td>JCheckBox</td><td>&nbsp;</td></tr>
    80  * <tr><td>i</td><td>-OIDtype</td><td>JComboBox</td><td>"hash","incremental"</td></tr>
    81  * <tr><td>i/b</td><td>-out</td><td>JTextField</td><td>&nbsp;</td></tr>
    82  * <tr><td>i</td><td>-removeold</td><td>JCheckBox</td><td>sanity check keepold</td></tr>
    83  * <tr><td>i</td><td>-sortmeta</td><td>JComboBox</td><td>&nbsp;</td></tr>
    84  * <tr><td>i/b</td><td>-verbosity</td><td>JSpinner</td><td>1, 3</td></tr>
    85  * </table></center>
    8663 * @author John Thompson, Greenstone Digital Library, University of Waikato
    8764 * @version 2.3
  • trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java

    r8506 r8590  
    4141import org.greenstone.gatherer.cdm.PlugInManager;
    4242import org.greenstone.gatherer.checklist.CheckList;
    43 import org.greenstone.gatherer.checklist.Entry;
     43import org.greenstone.gatherer.checklist.CheckListEntry;
    4444import org.greenstone.gatherer.collection.Collection;
    4545import org.greenstone.gatherer.gui.tree.DragTree;
     
    496496        // Remove 'warning.'
    497497        String title = Dictionary.get(property.substring(8) + ".Title");
    498         Entry entry = new Entry(title, value.equalsIgnoreCase(TRUE));
     498        CheckListEntry entry = new CheckListEntry(title, value.equalsIgnoreCase(TRUE));
    499499        entry.setProperty(property);
    500500        warning_preferences_check_list.addEntry(entry);
     
    683683        ListModel warning_preferences_check_list_model = warning_preferences_check_list.getModel();
    684684        for (int i = 0; i < warning_preferences_check_list_model.getSize(); i++) {
    685         Entry entry = (Entry) warning_preferences_check_list_model.getElementAt(i);
     685        CheckListEntry entry = (CheckListEntry) warning_preferences_check_list_model.getElementAt(i);
    686686        Configuration.set(entry.getProperty(), true, entry.isSelected());
    687687        }
Note: See TracChangeset for help on using the changeset viewer.