Changeset 8590
- Timestamp:
- 2004-11-18T09:55:22+13:00 (19 years ago)
- 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 37 37 import org.greenstone.gatherer.Gatherer; 38 38 import org.greenstone.gatherer.checklist.CheckList; 39 import org.greenstone.gatherer.checklist. Entry;39 import org.greenstone.gatherer.checklist.CheckListEntry; 40 40 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 41 41 import org.greenstone.gatherer.util.StaticStrings; … … 163 163 int size = collection_checklist_model.size(); 164 164 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); 166 166 if(entry.isSelected()) { 167 167 String collection_name = (String) entry.getProperty(); … … 224 224 225 225 // The current collection is always selected. 226 Entry entry = newEntry(collection_title);226 CheckListEntry entry = new CheckListEntry(collection_title); 227 227 entry.setProperty(collection_name); 228 228 entry.setSelected(getSuperCollection(collection_name) != null || collection_name.equals(current_coll_name)); -
trunk/gli/src/org/greenstone/gatherer/checklist/CheckList.java
r8496 r8590 63 63 this.show_selected_row = show_selected_row; 64 64 65 setCellRenderer(new C ellRenderer());65 setCellRenderer(new CheckListCellRenderer()); 66 66 setModel(new DefaultListModel()); 67 67 setSelectionMode(ListSelectionModel.SINGLE_SELECTION); … … 70 70 71 71 72 public void addEntry( Entry entry)72 public void addEntry(CheckListEntry entry) 73 73 { 74 74 DefaultListModel model = (DefaultListModel) getModel(); … … 92 92 DefaultListModel model = (DefaultListModel) getModel(); 93 93 for (int i = 0; i < model.size(); i++) { 94 (( Entry) model.get(i)).setSelected(false);94 ((CheckListEntry) model.get(i)).setSelected(false); 95 95 } 96 96 updateUI(); … … 107 107 DefaultListModel model = (DefaultListModel) getModel(); 108 108 for (int i = 0; i < model.size(); i++) { 109 Entry entry = (Entry) model.get(i);109 CheckListEntry entry = (CheckListEntry) model.get(i); 110 110 if (entry.isSelected()) { 111 111 result.add(entry.getObject()); … … 114 114 return result; 115 115 } 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 // }131 116 132 117 … … 139 124 for (int i = 0; i < list_data.size(); i++) { 140 125 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); 143 128 } 144 129 else { 145 addEntry(new Entry(list_object));130 addEntry(new CheckListEntry(list_object)); 146 131 } 147 132 } … … 157 142 DefaultListModel model = (DefaultListModel) getModel(); 158 143 for (int i = 0; i < model.size(); i++) { 159 Entry entry = (Entry) model.get(i);144 CheckListEntry entry = (CheckListEntry) model.get(i); 160 145 for (int j = 0; j < objects.length; j++) { 161 146 if (entry.getObject().equals(objects[j])) { … … 174 159 175 160 /** A custom list cell renderer for producing rows which contain clickable check boxes. */ 176 protected class C ellRenderer161 protected class CheckListCellRenderer 177 162 implements ListCellRenderer { 178 163 … … 216 201 JList list = (JList) e.getSource(); 217 202 int index = list.locationToIndex(e.getPoint()); 218 Entry checkbox = (Entry)list.getModel().getElementAt(index);203 CheckListEntry checkbox = (CheckListEntry)list.getModel().getElementAt(index); 219 204 if(!checkbox.isFixed()) { 220 205 checkbox.setSelected(!checkbox.isSelected()); -
trunk/gli/src/org/greenstone/gatherer/collection/ExportCollectionPrompt.java
r8496 r8590 48 48 import org.greenstone.gatherer.Gatherer; 49 49 import org.greenstone.gatherer.checklist.CheckList; 50 import org.greenstone.gatherer.checklist. Entry;50 import org.greenstone.gatherer.checklist.CheckListEntry; 51 51 import org.greenstone.gatherer.gui.GLIButton; 52 52 import org.greenstone.gatherer.gui.ModalDialog; … … 419 419 ok_button.setEnabled(false); 420 420 if(!list.isSelectionEmpty()) { 421 collection = (BasicCollectionConfiguration) (( Entry)list.getSelectedValue()).getObject();421 collection = (BasicCollectionConfiguration) ((CheckListEntry)list.getSelectedValue()).getObject(); 422 422 args = new String[5]; 423 423 args[0] = collection.getName(); -
trunk/gli/src/org/greenstone/gatherer/gems/GEMSPreferences.java
r8581 r8590 42 42 import org.greenstone.gatherer.cdm.PlugInManager; 43 43 import org.greenstone.gatherer.checklist.CheckList; 44 import org.greenstone.gatherer.checklist.Entry;45 44 import org.greenstone.gatherer.collection.Collection; 46 45 import org.greenstone.gatherer.gui.tree.DragTree; -
trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r8353 r8590 61 61 62 62 /** 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> </td></tr>67 * <tr><td>i/b</td><td>-archivedir</td><td>JTextField</td><td> </td></tr>68 * <tr><td>b</td><td>-builddir</td><td>JTextField</td><td> </td></tr>69 * <tr><td>i/b</td><td>-debug</td><td>JCheckBox</td><td> </td></tr>70 * <tr><td>i/b</td><td>-collectdir</td><td>JTextField</td><td> </td></tr>71 * <tr><td>b</td><td>-create_images</td><td>JCheckBox</td><td> </td></tr>72 * <tr><td>i</td><td>-groupsize</td><td>JSpinner </td><td> </td></tr>73 * <tr><td>i</td><td>-gzip</td><td>JCheckBox</td><td> </td></tr>74 * <tr><td>i</td><td>-importdir</td><td>JTextField</td><td> </td></tr>75 * <tr><td>b</td><td>-index</td><td>GCheckList</td><td> </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> </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> </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> </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> </td></tr>84 * <tr><td>i/b</td><td>-verbosity</td><td>JSpinner</td><td>1, 3</td></tr>85 * </table></center>86 63 * @author John Thompson, Greenstone Digital Library, University of Waikato 87 64 * @version 2.3 -
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r8506 r8590 41 41 import org.greenstone.gatherer.cdm.PlugInManager; 42 42 import org.greenstone.gatherer.checklist.CheckList; 43 import org.greenstone.gatherer.checklist. Entry;43 import org.greenstone.gatherer.checklist.CheckListEntry; 44 44 import org.greenstone.gatherer.collection.Collection; 45 45 import org.greenstone.gatherer.gui.tree.DragTree; … … 496 496 // Remove 'warning.' 497 497 String title = Dictionary.get(property.substring(8) + ".Title"); 498 Entry entry = newEntry(title, value.equalsIgnoreCase(TRUE));498 CheckListEntry entry = new CheckListEntry(title, value.equalsIgnoreCase(TRUE)); 499 499 entry.setProperty(property); 500 500 warning_preferences_check_list.addEntry(entry); … … 683 683 ListModel warning_preferences_check_list_model = warning_preferences_check_list.getModel(); 684 684 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); 686 686 Configuration.set(entry.getProperty(), true, entry.isSelected()); 687 687 }
Note:
See TracChangeset
for help on using the changeset viewer.