Ignore:
Timestamp:
2003-05-27T15:40:47+12:00 (21 years ago)
Author:
mdewsnip
Message:

Fixed tabbing.

File:
1 edited

Legend:

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

    r4293 r4364  
    6060 */
    6161public class GBasicProgressMonitor
    62     extends JProgressBar
    63     implements GShellProgressMonitor {
    64     /** Whether the process has been asked to stop. */
    65     private boolean stop = false;
    66     /** Constructor **/
    67     public GBasicProgressMonitor() {
    68           super();
    69           //this.setIcon(ready);
    70     }
    71     /** Don't do anything if we are given a progress bar, we have our own.
     62    extends JProgressBar
     63    implements GShellProgressMonitor {
     64    /** Whether the process has been asked to stop. */
     65    private boolean stop = false;
     66    /** Constructor **/
     67    public GBasicProgressMonitor() {
     68    super();
     69    //this.setIcon(ready);
     70    }
     71    /** Don't do anything if we are given a progress bar, we have our own.
    7272      * @param progress_bar A JProgressBar
    7373      */
    74     public void addProgressBar(JProgressBar progress_bar) {
    75     }
    76     /** Determine the script exit value according to the progress monitor. This gets around a problem where several script failures actually result with a successful exit value.
     74    public void addProgressBar(JProgressBar progress_bar) {
     75    }
     76    /** Determine the script exit value according to the progress monitor. This gets around a problem where several script failures actually result with a successful exit value.
    7777      * @return A <i>int</i> with a value of zero if and only if the script was successful.
    7878      */
    79     public int exitValue() {
    80           // Always return true as we don't know any better.
    81           return 0;
    82     }
    83     /** As we are probably accessing this via an interface we need to gain
     79    public int exitValue() {
     80    // Always return true as we don't know any better.
     81    return 0;
     82    }
     83    /** As we are probably accessing this via an interface we need to gain
    8484      * access to the component itself.
    8585      */
    86     public Component getProgress() {
    87           return this;
    88     }
    89     /** Method to determine the state of the stop flag, which may be set by the visual component that created this monitor.
     86    public Component getProgress() {
     87    return this;
     88    }
     89    /** Method to determine the state of the stop flag, which may be set by the visual component that created this monitor.
    9090      * @return A <strong>boolean</strong> indicating if the process has been asked to stop.
    9191      */
    92     public boolean hasSignalledStop() {
    93           return stop;
    94     }
    95     /** Inform the progress bar that it should programatically increment progress by one step. */
    96     public void increment() {
    97           // We can't do anything about this.
    98     }
    99     /** The parse method is how more complex progress bars figure out how far they have progressed. However we don't.
     92    public boolean hasSignalledStop() {
     93    return stop;
     94    }
     95    /** Inform the progress bar that it should programatically increment progress by one step. */
     96    public void increment() {
     97    // We can't do anything about this.
     98    }
     99    /** The parse method is how more complex progress bars figure out how far they have progressed. However we don't.
    100100      * @param line A String representing the latest line of output from
    101101      * the external process we are monitoring.
    102102      */
    103     public void parse(String line) {
    104     }
    105     /** Since the creator of this process monitor is actually in the GUI, this class provides the simpliest way to send a cancel process message between the two.
     103    public void parse(String line) {
     104    }
     105    /** Since the creator of this process monitor is actually in the GUI, this class provides the simpliest way to send a cancel process message between the two.
    106106      * @param state The desired state of the stop flag as a <strong>boolean</strong>.
    107107      */
    108     public void setStop(boolean state) {
    109           stop = state;
    110     }
    111     /** This method tells this class that the job it is showing the progress
     108    public void setStop(boolean state) {
     109    stop = state;
     110    }
     111    /** This method tells this class that the job it is showing the progress
    112112      * for has begun.
    113113      */
    114     public void start() {
    115           //this.setIcon(busy);
    116           setIndeterminate(true);
    117     }
    118     /** This method tells this class that the job it is showing the progress
     114    public void start() {
     115    //this.setIcon(busy);
     116    setIndeterminate(true);
     117    }
     118    /** This method tells this class that the job it is showing the progress
    119119      * for has come to an end.
    120120      */
    121     public void stop() {
    122           //this.setIcon(ready);
    123           setIndeterminate(false);
    124     }
     121    public void stop() {
     122    //this.setIcon(ready);
     123    setIndeterminate(false);
     124    }
    125125}
Note: See TracChangeset for help on using the changeset viewer.