[izpack-changes] r1957 - in izpack-src/trunk: . src/lib/com/izforge/izpack/panels

noreply at berlios.de noreply at berlios.de
Fri Dec 14 15:24:28 CET 2007


Author: jponge
Date: 2007-12-14 15:24:25 +0100 (Fri, 14 Dec 2007)
New Revision: 1957

Modified:
   izpack-src/trunk/IzPack-head.ipr
   izpack-src/trunk/src/lib/com/izforge/izpack/panels/ProcessPanel.java
Log:
Make the progress bar indeterminate, else if you have few processes to execute then your 
installer seems to be doing nothing... This is especially true if you have just one process to 
run.


Modified: izpack-src/trunk/IzPack-head.ipr
===================================================================
--- izpack-src/trunk/IzPack-head.ipr	2007-12-14 13:47:45 UTC (rev 1956)
+++ izpack-src/trunk/IzPack-head.ipr	2007-12-14 14:24:25 UTC (rev 1957)
@@ -246,7 +246,7 @@
       <module fileurl="file://$PROJECT_DIR$/IzPack-head.iml" filepath="$PROJECT_DIR$/IzPack-head.iml" />
     </modules>
   </component>
-  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="false" project-jdk-name="1.5" />
+  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="false" project-jdk-name="1.6" project-jdk-type="JavaSDK" />
   <component name="ResourceManagerContainer">
     <option name="myResourceBundles">
       <value>

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/panels/ProcessPanel.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/panels/ProcessPanel.java	2007-12-14 13:47:45 UTC (rev 1956)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/panels/ProcessPanel.java	2007-12-14 14:24:25 UTC (rev 1957)
@@ -74,9 +74,9 @@
     private ProcessPanelWorker worker;
 
     /** Number of jobs to process. Used for progress indication. */
-    private int noOfJobs;
+    private int noOfJobs = 0;
 
-    private int currentJob;
+    private int currentJob = 0;
 
     /** Where the output is displayed */
     private JTextArea outputPane;
@@ -145,17 +145,17 @@
     public void startProcessing(int no_of_jobs)
     {
         this.noOfJobs = no_of_jobs;
-        overallProgressBar.setMaximum(noOfJobs);
+        overallProgressBar.setMaximum(no_of_jobs);
+        overallProgressBar.setIndeterminate(true);
         parent.lockPrevButton();
     }
 
     /** The compiler stops. */
     public void finishProcessing()
     {
-        overallProgressBar.setValue(this.noOfJobs);
+        overallProgressBar.setIndeterminate(false);
         String no_of_jobs = Integer.toString(this.noOfJobs);
         overallProgressBar.setString(no_of_jobs + " / " + no_of_jobs);
-        overallProgressBar.setEnabled(false);
 
         processLabel.setText(" ");
         processLabel.setEnabled(false);
@@ -193,16 +193,18 @@
     public void startProcess(String jobName)
     {
         processLabel.setText(jobName);
-    }
-
-    public void finishProcess()
-    {
+        
         this.currentJob++;
         overallProgressBar.setValue(this.currentJob);
         overallProgressBar.setString(Integer.toString(this.currentJob) + " / "
                 + Integer.toString(this.noOfJobs));
     }
 
+    public void finishProcess()
+    {
+
+    }
+
     /** Called when the panel becomes active. */
     public void panelActivate()
     {



More information about the izpack-changes mailing list