Ignore:
Timestamp:
2003-10-06T13:32:25+13:00 (21 years ago)
Author:
mdewsnip
Message:

Many formatting, structural and code improvements.

File:
1 edited

Legend:

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

    r5159 r5581  
    3535 *########################################################################
    3636 */
    37 
    38  
    39 
    40 
    41 
    42 
    43 /* GPL_HEADER */
    4437package org.greenstone.gatherer.checklist;
     38
    4539/**************************************************************************************
    4640 * Title:        Gatherer
     
    5650import javax.swing.border.*;
    5751import org.greenstone.gatherer.checklist.Entry;
     52
    5853/** This class provides a visual component that has the form of a list, as provided by JList but uses JCheckBox for data selection. Thus several elements can be 'ticked' in the list, and this selection returned using the method getSelected().<BR>Parts of this code modified from Trevor Harmon's posting on www.dejanews.com.
    5954 * @author John Thompson
     
    156151
    157152    /** Retrieve the currently ticked entries from this list.
    158       * @return An <strong>ArrayList</strong> containing only those entries from the initial list that are checked.
    159       * @see org.greenstone.gatherer.checklist.CheckList.Entry
    160       */
     153     * @return An <strong>ArrayList</strong> containing only those entries from the initial list that are checked.
     154     * @see org.greenstone.gatherer.checklist.CheckList.Entry
     155     */
    161156    public ArrayList getSelected() {
    162157    ArrayList result = new ArrayList();
     
    230225
    231226    /** Checks the entries in the list whose name appear in the given array.
    232       * @param names The name of entries to be checked as a <strong>String[]</strong>.
    233       * @see org.greenstone.gatherer.checklist.CheckList.Entry
    234       */
     227     * @param names The name of entries to be checked as a <strong>String[]</strong>.
     228     * @see org.greenstone.gatherer.checklist.CheckList.Entry
     229     */
    235230    public void setSelected(String names[]) {
    236231    DefaultListModel model = (DefaultListModel) getModel();
     
    260255     * @param cell_has_focus <i>true</i> if and only if the specified cell has the focus.
    261256     * @return A <strong>Component</strong> whose paint() method will render the specified value.
    262             */
     257     */
    263258    public Component getListCellRendererComponent(JList list, Object value, int index, boolean is_selected, boolean cell_has_focus) {
    264259        JCheckBox checkbox = (JCheckBox) value;
     
    301296    }
    302297}
    303 
Note: See TracChangeset for help on using the changeset viewer.