Ignore:
Timestamp:
2006-01-20T11:39:44+13:00 (18 years ago)
Author:
mdewsnip
Message:

Used GProgressBars instead of JProgressBars, because they're safer when setting indeterminate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/shell/GBuildProgressMonitor.java

    r10618 r11076  
    3939import java.awt.Component;
    4040import java.util.ArrayList;
    41 import javax.swing.JProgressBar;
    4241import org.greenstone.gatherer.Configuration;
    4342import org.greenstone.gatherer.DebugStream;
     
    4544import org.greenstone.gatherer.Gatherer;
    4645import org.greenstone.gatherer.cdm.CollectionDesignManager;
     46import org.greenstone.gatherer.gui.GProgressBar;
    4747import org.greenstone.gatherer.util.StaticStrings;
    4848/** This implementation of <i>GShellProgressMonitor</i> is designed to parse and translate the progress of a buildcol.pl call.
     
    126126    private int state = BASE;
    127127    /** The progress bar this monitor updates. */
    128     private JProgressBar progress_bar;
     128    private GProgressBar progress_bar;
    129129    /** A progress bar that is shared between this this listener and the Import monitor. */
    130     private JProgressBar shared_progress_bar;
     130    private GProgressBar shared_progress_bar;
    131131
    132132    /** Construct a new GBuildProgressMonitor. */
    133     public GBuildProgressMonitor(JProgressBar shared_progress_bar) {
     133    public GBuildProgressMonitor(GProgressBar shared_progress_bar) {
    134134    this.shared_progress_bar = shared_progress_bar;
    135     progress_bar = new JProgressBar();
     135    progress_bar = new GProgressBar();
    136136    progress_bar.setMaximum(MAX);
    137137    progress_bar.setMinimum(MIN);
     
    142142
    143143    /** Method to register a new progress bar with this monitor.
    144      * @param progress_bar The new <strong>JProgressBar</strong>.
     144     * @param progress_bar The new <strong>GProgressBar</strong>.
    145145     */ 
    146     public void addProgressBar(JProgressBar progress_bar) {
     146    public void addProgressBar(GProgressBar progress_bar) {
    147147    this.progress_bar = progress_bar;
    148148    progress_bar.setMaximum(MAX);
     
    162162    return 1;
    163163    }
    164     /** Method to retrieve whatever control is being used as the progress indicator. Usually a <strong>JProgressBar</strong> but there may be others implemented later.
     164    /** Method to retrieve whatever control is being used as the progress indicator. Usually a <strong>GProgressBar</strong> but there may be others implemented later.
    165165     * @return A <strong>Component</strong> on which the progress of the process is being displayed.
    166166     */
     
    169169    }
    170170
    171     public JProgressBar getSharedProgress() {
     171    public GProgressBar getSharedProgress() {
    172172    return shared_progress_bar;
    173173    }
     
    533533    }
    534534
    535     public void setSharedProgressBar(JProgressBar shared_progress_bar) {
     535    public void setSharedProgressBar(GProgressBar shared_progress_bar) {
    536536    this.shared_progress_bar = shared_progress_bar;
    537537    }
Note: See TracChangeset for help on using the changeset viewer.