Index: trunk/gli/src/org/greenstone/gatherer/checklist/CheckList.java
===================================================================
--- trunk/gli/src/org/greenstone/gatherer/checklist/CheckList.java	(revision 4293)
+++ trunk/gli/src/org/greenstone/gatherer/checklist/CheckList.java	(revision 4366)
@@ -66,173 +66,173 @@
 // ####################################################################################
 public class CheckList
-	 extends JList {
-	 /** The border used when a list row is not in focus. */
-	 protected static Border noFocusBorder = new EmptyBorder(1, 1, 1, 1);
-	 /** Constructor. */
-	 public CheckList() {
-		  super();
-		  setCellRenderer(new CellRenderer());
-		  setModel(new DefaultListModel());
-		  setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-		  addMouseListener(new CheckListListener());
-	 }
-	 /** Constructor.
+    extends JList {
+    /** The border used when a list row is not in focus. */
+    protected static Border noFocusBorder = new EmptyBorder(1, 1, 1, 1);
+    /** Constructor. */
+    public CheckList() {
+	super();
+	setCellRenderer(new CellRenderer());
+	setModel(new DefaultListModel());
+	setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+	addMouseListener(new CheckListListener());
+    }
+    /** Constructor.
 	  * @param list_data An <strong>ArrayList</strong> of entries for this checklist.
 	  * @see org.greenstone.gatherer.checklist.CheckList.Entry
 	  */
-	 public CheckList(ArrayList list_data) {
-		  super();
-		  // Create a new model.
-		  DefaultListModel model = new DefaultListModel();
-		  for(int i = 0; i < list_data.size(); i++) {
-				Entry entry = new Entry(list_data.get(i));
-				String name = entry.toString();
-				int index = 0;
-				boolean found = false;
-				while(index < model.size() && !found) {
-					 Object sibling = model.getElementAt(index);
-					 if(name.compareTo(sibling.toString()) <= 0) {
-						  model.add(index, entry);
-						  found = true;
-					 }
-					 index++;
-				}
-				if(!found) {
-					 model.addElement(entry);
-				}
-		  }
-		  setModel(model);
-		  setCellRenderer(new CellRenderer());
-		  addMouseListener(new CheckListListener());
-		  setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-	 }
-
-	 /** Constructor. */
-	 public CheckList(ListModel data_model) {
-		  super(data_model);
-		  setCellRenderer(new CellRenderer());
-		  addMouseListener(new CheckListListener());
-		  setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-	 }
-
-	 public void addEntry(Entry entry) {
-		  DefaultListModel model = (DefaultListModel) getModel();
-		  String name = entry.toString();
-		  int index = 0;
-		  boolean found = false;
-		  while(index < model.size() && !found) {
-				Object sibling = model.getElementAt(index);
-				if(name.compareTo(sibling.toString()) <= 0) {
-					 model.add(index, entry);
-					 found = true;
-				}
-				index++;
-				sibling = null;
-		  }
-		  if(!found) {
-				model.addElement(entry);
-		  }		  
-		  name = null;
-		  model = null;
-	 }
-
-	 public Entry get(int index) {
-		  DefaultListModel model = (DefaultListModel) getModel();
-		  return (Entry) model.get(index);
-	 }
-
-	 /** Retrieve the currently ticked entries from this list.
+    public CheckList(ArrayList list_data) {
+	super();
+	// Create a new model.
+	DefaultListModel model = new DefaultListModel();
+	for(int i = 0; i < list_data.size(); i++) {
+	    Entry entry = new Entry(list_data.get(i));
+	    String name = entry.toString();
+	    int index = 0;
+	    boolean found = false;
+	    while(index < model.size() && !found) {
+		Object sibling = model.getElementAt(index);
+		if(name.compareTo(sibling.toString()) <= 0) {
+		    model.add(index, entry);
+		    found = true;
+		}
+		index++;
+	    }
+	    if(!found) {
+		model.addElement(entry);
+	    }
+	}
+	setModel(model);
+	setCellRenderer(new CellRenderer());
+	addMouseListener(new CheckListListener());
+	setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+    }
+
+    /** Constructor. */
+    public CheckList(ListModel data_model) {
+	super(data_model);
+	setCellRenderer(new CellRenderer());
+	addMouseListener(new CheckListListener());
+	setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+    }
+
+    public void addEntry(Entry entry) {
+	DefaultListModel model = (DefaultListModel) getModel();
+	String name = entry.toString();
+	int index = 0;
+	boolean found = false;
+	while(index < model.size() && !found) {
+	    Object sibling = model.getElementAt(index);
+	    if(name.compareTo(sibling.toString()) <= 0) {
+		model.add(index, entry);
+		found = true;
+	    }
+	    index++;
+	    sibling = null;
+	}
+	if(!found) {
+	    model.addElement(entry);
+	}		  
+	name = null;
+	model = null;
+    }
+
+    public Entry get(int index) {
+	DefaultListModel model = (DefaultListModel) getModel();
+	return (Entry) model.get(index);
+    }
+
+    /** Retrieve the currently ticked entries from this list.
 	  * @return An <strong>ArrayList</strong> containing only those entries from the initial list that are checked.
 	  * @see org.greenstone.gatherer.checklist.CheckList.Entry
 	  */
-	 public ArrayList getSelected() {
-		  ArrayList result = new ArrayList();
-		  DefaultListModel model = (DefaultListModel) getModel();
-		  int size = model.size();
-		  for(int i = 0; i < size; i++) {
-				Entry entry = (Entry) model.get(i);
-				if(entry.isSelected()) {
-					 result.add(entry.getObject());
-				}
-		  }
-		  return result;
-	 }
-
-	 public boolean isSelected(int index) {
-		  DefaultListModel model = (DefaultListModel) getModel();
-		  Entry entry = (Entry) model.get(index);
-		  return entry.isSelected();
-	 }
-
-	 public int getEntryCount() {
-		  return getModel().getSize();
-	 }
-
-	 /** Checks the entries in the list whose name appear in the given array.
+    public ArrayList getSelected() {
+	ArrayList result = new ArrayList();
+	DefaultListModel model = (DefaultListModel) getModel();
+	int size = model.size();
+	for(int i = 0; i < size; i++) {
+	    Entry entry = (Entry) model.get(i);
+	    if(entry.isSelected()) {
+		result.add(entry.getObject());
+	    }
+	}
+	return result;
+    }
+
+    public boolean isSelected(int index) {
+	DefaultListModel model = (DefaultListModel) getModel();
+	Entry entry = (Entry) model.get(index);
+	return entry.isSelected();
+    }
+
+    public int getEntryCount() {
+	return getModel().getSize();
+    }
+
+    /** Checks the entries in the list whose name appear in the given array.
 	  * @param names The name of entries to be checked as a <strong>String[]</strong>.
 	  * @see org.greenstone.gatherer.checklist.CheckList.Entry
 	  */
-	 public void setSelected(String names[]) {
-		  DefaultListModel model = (DefaultListModel) getModel();
-		  int size = model.size();
-		  for(int i = 0; i < size; i++) {
-				Entry entry = (Entry) model.get(i);
-				for(int j = 0; names != null && j < names.length; j++) {
-					 if(entry.toString().equals(names[j])) {
-						  entry.setSelected(true);
-					 }
-				}
-		  }		  
-	 }
-	 /** A custom list cell renderer for producing rows which contain clickable check boxes. */
-	 protected class CellRenderer 
-		  implements ListCellRenderer {
-		  /** Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize  can be invoked.
-			* @param list The </strong>JList</strong> we're painting.
-			* @param value The value returned by list.getModel().getElementAt(index), as an <strong>Object</strong>.
-			* @param index The cells index as an <i>int</i>.
-			* @param is_selected <i>true</i> if the specified cell was selected, <i>false</i> otherwise.
-			* @param cell_has_focus <i>true</i> if and only if the specified cell has the focus.
-			* @return A <strong>Component</strong> whose paint() method will render the specified value.
+    public void setSelected(String names[]) {
+	DefaultListModel model = (DefaultListModel) getModel();
+	int size = model.size();
+	for(int i = 0; i < size; i++) {
+	    Entry entry = (Entry) model.get(i);
+	    for(int j = 0; names != null && j < names.length; j++) {
+		if(entry.toString().equals(names[j])) {
+		    entry.setSelected(true);
+		}
+	    }
+	}		  
+    }
+    /** A custom list cell renderer for producing rows which contain clickable check boxes. */
+    protected class CellRenderer 
+	implements ListCellRenderer {
+	/** Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize  can be invoked.
+	 * @param list The </strong>JList</strong> we're painting.
+	 * @param value The value returned by list.getModel().getElementAt(index), as an <strong>Object</strong>.
+	 * @param index The cells index as an <i>int</i>.
+	 * @param is_selected <i>true</i> if the specified cell was selected, <i>false</i> otherwise.
+	 * @param cell_has_focus <i>true</i> if and only if the specified cell has the focus.
+	 * @return A <strong>Component</strong> whose paint() method will render the specified value.
 			*/
-		  public Component getListCellRendererComponent(JList list, Object value, int index, boolean is_selected, boolean cell_has_focus) {
-				JCheckBox checkbox = (JCheckBox) value;
-				checkbox.setBackground(is_selected ? list.getSelectionBackground() : list.getBackground());
-				checkbox.setForeground(is_selected ? list.getSelectionForeground() : list.getForeground());
-				checkbox.setEnabled(list.isEnabled());
-				checkbox.setFont(list.getFont());
-				checkbox.setFocusPainted(false);
-				checkbox.setBorderPainted(true);
-				checkbox.setBorder((is_selected) ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
-				return checkbox;
-		  }
-	 }
-	 /** Listens for clicks apon the checks within the list, and updates as necessary. */
-	 private class CheckListListener 
-		  extends MouseAdapter {
-		  private Entry previous_checkbox = null;
-		  /** Called whenever the mouse is clicked over our list. We find the nearest checkbox and change its state.
-			* @param e A <strong>MouseEvent</strong> containing everything you ever wanted to know about the mouse event but were afraid to ask.
-			*/
-		  public void mousePressed(MouseEvent e) {
-				JList list = (JList) e.getSource();
-				int index = list.locationToIndex(e.getPoint());
-				Entry checkbox = (Entry)list.getModel().getElementAt(index);
+	public Component getListCellRendererComponent(JList list, Object value, int index, boolean is_selected, boolean cell_has_focus) {
+	    JCheckBox checkbox = (JCheckBox) value;
+	    checkbox.setBackground(is_selected ? list.getSelectionBackground() : list.getBackground());
+	    checkbox.setForeground(is_selected ? list.getSelectionForeground() : list.getForeground());
+	    checkbox.setEnabled(list.isEnabled());
+	    checkbox.setFont(list.getFont());
+	    checkbox.setFocusPainted(false);
+	    checkbox.setBorderPainted(true);
+	    checkbox.setBorder((is_selected) ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
+	    return checkbox;
+	}
+    }
+    /** Listens for clicks apon the checks within the list, and updates as necessary. */
+    private class CheckListListener 
+	extends MouseAdapter {
+	private Entry previous_checkbox = null;
+	/** Called whenever the mouse is clicked over our list. We find the nearest checkbox and change its state.
+	 * @param e A <strong>MouseEvent</strong> containing everything you ever wanted to know about the mouse event but were afraid to ask.
+	 */
+	public void mousePressed(MouseEvent e) {
+	    JList list = (JList) e.getSource();
+	    int index = list.locationToIndex(e.getPoint());
+	    Entry checkbox = (Entry)list.getModel().getElementAt(index);
 				// If this is the same checkbox as was recently selected, change the tick.
-				if(list.isSelectedIndex(index) && checkbox == previous_checkbox) {
-					 if(!checkbox.isFixed()) {
-						  checkbox.setSelected(!checkbox.isSelected());
-					 }
-					 checkbox.grabFocus();
-				}
+	    if(list.isSelectedIndex(index) && checkbox == previous_checkbox) {
+		if(!checkbox.isFixed()) {
+		    checkbox.setSelected(!checkbox.isSelected());
+		}
+		checkbox.grabFocus();
+	    }
 				// Otherwise the selection has just changed, so select the new checkbox
-				else if(list.isSelectedIndex(index)) {
-					 previous_checkbox = checkbox;
-				}
-				else {
-					 previous_checkbox = null;
-				}
-		  }
-	 }
+	    else if(list.isSelectedIndex(index)) {
+		previous_checkbox = checkbox;
+	    }
+	    else {
+		previous_checkbox = null;
+	    }
+	}
+    }
 }
 
