- Timestamp:
- 2006-01-20T11:39:44+13:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/shell
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/shell/GBuildProgressMonitor.java
r10618 r11076 39 39 import java.awt.Component; 40 40 import java.util.ArrayList; 41 import javax.swing.JProgressBar;42 41 import org.greenstone.gatherer.Configuration; 43 42 import org.greenstone.gatherer.DebugStream; … … 45 44 import org.greenstone.gatherer.Gatherer; 46 45 import org.greenstone.gatherer.cdm.CollectionDesignManager; 46 import org.greenstone.gatherer.gui.GProgressBar; 47 47 import org.greenstone.gatherer.util.StaticStrings; 48 48 /** This implementation of <i>GShellProgressMonitor</i> is designed to parse and translate the progress of a buildcol.pl call. … … 126 126 private int state = BASE; 127 127 /** The progress bar this monitor updates. */ 128 private JProgressBar progress_bar;128 private GProgressBar progress_bar; 129 129 /** 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; 131 131 132 132 /** Construct a new GBuildProgressMonitor. */ 133 public GBuildProgressMonitor( JProgressBar shared_progress_bar) {133 public GBuildProgressMonitor(GProgressBar shared_progress_bar) { 134 134 this.shared_progress_bar = shared_progress_bar; 135 progress_bar = new JProgressBar();135 progress_bar = new GProgressBar(); 136 136 progress_bar.setMaximum(MAX); 137 137 progress_bar.setMinimum(MIN); … … 142 142 143 143 /** 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>. 145 145 */ 146 public void addProgressBar( JProgressBar progress_bar) {146 public void addProgressBar(GProgressBar progress_bar) { 147 147 this.progress_bar = progress_bar; 148 148 progress_bar.setMaximum(MAX); … … 162 162 return 1; 163 163 } 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. 165 165 * @return A <strong>Component</strong> on which the progress of the process is being displayed. 166 166 */ … … 169 169 } 170 170 171 public JProgressBar getSharedProgress() {171 public GProgressBar getSharedProgress() { 172 172 return shared_progress_bar; 173 173 } … … 533 533 } 534 534 535 public void setSharedProgressBar( JProgressBar shared_progress_bar) {535 public void setSharedProgressBar(GProgressBar shared_progress_bar) { 536 536 this.shared_progress_bar = shared_progress_bar; 537 537 } -
trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java
r11068 r11076 39 39 import java.awt.Component; 40 40 import java.util.*; 41 import javax.swing.JProgressBar;42 41 import org.greenstone.gatherer.Configuration; 43 42 import org.greenstone.gatherer.DebugStream; 44 43 import org.greenstone.gatherer.Dictionary; 45 44 import org.greenstone.gatherer.Gatherer; 45 import org.greenstone.gatherer.gui.GProgressBar; 46 46 import org.greenstone.gatherer.util.StaticStrings; 47 47 … … 69 69 private int threshold = Configuration.SYSTEMS_MODE; 70 70 /** The progress bar this monitor updates. */ 71 private JProgressBar progress_bar;71 private GProgressBar progress_bar; 72 72 73 73 /** The progress bar that is shared with build monitor. */ 74 private JProgressBar shared_progress_bar;74 private GProgressBar shared_progress_bar; 75 75 76 76 /** */ … … 116 116 117 117 public GImportProgressMonitor() { 118 progress_bar = new JProgressBar();118 progress_bar = new GProgressBar(); 119 119 progress_bar.setIndeterminate(false); 120 120 progress_bar.setMaximum(MAXIMUM); … … 123 123 progress_bar.setStringPainted(true); 124 124 next_progress_value = CALCULATION; 125 shared_progress_bar = new JProgressBar();125 shared_progress_bar = new GProgressBar(); 126 126 shared_progress_bar.setIndeterminate(false); 127 127 shared_progress_bar.setMaximum(MAXIMUM * 2); … … 133 133 134 134 /** Method to register a new progress bar with this monitor. 135 * @param progress_bar The new <strong> JProgressBar</strong>.136 */ 137 public void addProgressBar( JProgressBar progress_bar) {135 * @param progress_bar The new <strong>GProgressBar</strong>. 136 */ 137 public void addProgressBar(GProgressBar progress_bar) { 138 138 this.progress_bar = progress_bar; 139 139 progress_bar.setMaximum(MAXIMUM); … … 160 160 } 161 161 162 /** Method to retrieve whatever control is being used as the progress indicator. Usually a <strong> JProgressBar</strong> but there may be others implemented later.162 /** Method to retrieve whatever control is being used as the progress indicator. Usually a <strong>GProgressBar</strong> but there may be others implemented later. 163 163 * @return A <strong>Component</strong> on which the progress of the process is being displayed. 164 164 */ … … 167 167 } 168 168 169 public JProgressBar getSharedProgress() {169 public GProgressBar getSharedProgress() { 170 170 return shared_progress_bar; 171 171 } -
trunk/gli/src/org/greenstone/gatherer/shell/GShellProgressMonitor.java
r8243 r11076 50 50 import java.awt.Component; 51 51 import java.util.ArrayList; 52 import javax.swing.JProgressBar;52 import org.greenstone.gatherer.gui.GProgressBar; 53 53 54 54 /** When implemented, this interface allows another class to monitor the progress of a <strong>GShell</strong> process. Specifically implementing classes should be designed to take the textual output from the process and then translate that message into some quanitive measure of progress which can then be shown on the progress bar. … … 56 56 public interface GShellProgressMonitor { 57 57 /** Method to register a new progress bar with this monitor. 58 * @param progress_bar The new <strong> JProgressBar</strong>.58 * @param progress_bar The new <strong>GProgressBar</strong>. 59 59 */ 60 public void addProgressBar( JProgressBar progress_bar);60 public void addProgressBar(GProgressBar progress_bar); 61 61 62 62 /** 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. … … 65 65 public int exitValue(); 66 66 67 public JProgressBar getSharedProgress();67 public GProgressBar getSharedProgress(); 68 68 69 /** Method to retrieve whatever control is being used as the progress indicator. Usually a <strong> JProgressBar</strong> but there may be others implemented later.69 /** Method to retrieve whatever control is being used as the progress indicator. Usually a <strong>GProgressBar</strong> but there may be others implemented later. 70 70 * @return A <strong>Component</strong> on which the progress of the process is being displayed. 71 71 */
Note:
See TracChangeset
for help on using the changeset viewer.