Changeset 10008


Ignore:
Timestamp:
2005-06-03T14:45:24+12:00 (19 years ago)
Author:
mdewsnip
Message:

Removed the Dimension objects from the Utility class, as part of tidying it up.

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

Legend:

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

    r9907 r10008  
    5050 */
    5151public class SearchTypeManager
    52     extends DOMProxyListModel {
    53    
     52    extends DOMProxyListModel
     53{
     54    static final private Dimension LABEL_SIZE = new Dimension(150, 25);
     55
    5456    static final public String[] SEARCH_TYPES = {  "plain" , "form"};
    5557    static final public String[] BUILD_TYPES = {  "lucene", "mgpp" };
     
    194196
    195197        build_type_combobox = new GComboBox(BUILD_TYPES);
    196         build_type_combobox.setPreferredSize(Utility.LABEL_SIZE);
     198        build_type_combobox.setPreferredSize(LABEL_SIZE);
    197199        build_type_combobox.setBackgroundNonSelectionColor(Configuration.getColor("coloring.editable_background", false));
    198200        build_type_combobox.setBackgroundSelectionColor(Configuration.getColor("coloring.collection_selection_background", false));
     
    243245        Dictionary.registerText(search_type_label, "CDM.SearchTypeManager.SearchType_Selection");
    244246        search_type_combobox = new GComboBox(SEARCH_TYPES);
    245         search_type_combobox.setPreferredSize(Utility.LABEL_SIZE);
     247        search_type_combobox.setPreferredSize(LABEL_SIZE);
    246248        search_type_combobox.setBackgroundNonSelectionColor(Configuration.getColor("coloring.editable_background", false));
    247249        search_type_combobox.setBackgroundSelectionColor(Configuration.getColor("coloring.collection_selection_background", false));
  • trunk/gli/src/org/greenstone/gatherer/gui/DownloadProgressBar.java

    r8994 r10008  
    4545import org.greenstone.gatherer.collection.DownloadJob;
    4646import org.greenstone.gatherer.util.AppendLineOnlyFileDocument;
    47 import org.greenstone.gatherer.util.Utility;
     47
    4848
    4949public class DownloadProgressBar
    5050    extends JPanel
    5151    implements ActionListener {
     52
     53    static final private Dimension MINIMUM_BUTTON_SIZE = new Dimension(100, 25);
     54    static final private Dimension PROGRESS_BAR_SIZE = new Dimension(580,65);
    5255
    5356    private boolean simple = false;
     
    127130    stop_start_button.addActionListener(this);
    128131    stop_start_button.addActionListener(owner);
    129     stop_start_button.setMinimumSize(Utility.MINIMUM_BUTTON_SIZE);
     132    stop_start_button.setMinimumSize(MINIMUM_BUTTON_SIZE);
    130133    stop_start_button.setMnemonic(KeyEvent.VK_P);
    131134    stop_start_button.setEnabled(true);
     
    136139    log_button.addActionListener(this);
    137140    log_button.setEnabled(false);
    138     log_button.setMinimumSize(Utility.MINIMUM_BUTTON_SIZE);
     141    log_button.setMinimumSize(MINIMUM_BUTTON_SIZE);
    139142    log_button.setMnemonic(KeyEvent.VK_L);
    140143    Dictionary.registerBoth(log_button, "Mirroring.DownloadJob.Log", "Mirroring.DownloadJob.Log_Tooltip");
     
    143146    close_button.addActionListener(owner);
    144147    close_button.addActionListener(this);
    145     close_button.setMinimumSize(Utility.MINIMUM_BUTTON_SIZE);
     148    close_button.setMinimumSize(MINIMUM_BUTTON_SIZE);
    146149    close_button.setMnemonic(KeyEvent.VK_C);
    147150    close_button.setEnabled(true);
     
    238241
    239242    public Dimension getPreferredSize() {
    240     return Utility.PROGRESS_BAR_SIZE;
     243    return PROGRESS_BAR_SIZE;
    241244    }
    242245
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r10007 r10008  
    6060 * @version 2.3b
    6161 */
    62 public class Utility {
    63     static final public Dimension MINIMUM_BUTTON_SIZE = new Dimension(100, 25);
    64     // static final public Dimension DOUBLE_IMAGE_BUTTON_SIZE = new Dimension(190, 35);
    65     static final public Dimension LABEL_SIZE = new Dimension(150, 25);
    66     /** The default size of a gatherer progress bar, in either the download view or the build view. */
    67     static final public Dimension PROGRESS_BAR_SIZE = new Dimension(580,65);
    68     /** The number of kilobytes to use as a io buffer. */
    69     static final public int FACTOR = 1;
    70     /** The size of the io buffer, calculated as FACTOR * 1024. */
    71     static final public int BUFFER_SIZE = FACTOR * 1024;
     62public class Utility
     63{
     64    /** The size of the io buffer, in bytes. */
     65    static final public int BUFFER_SIZE = 1024;
    7266    /** Definition of an important directory name, in this case the base dir, or the working directory of the Gatherer. */
    7367
Note: See TracChangeset for help on using the changeset viewer.