From 6ab40bb68368f230de43c6a44e828ab5cd4e162d Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 21 Nov 2006 10:46:25 +0000
Subject: [PATCH] Update some labels and URL as suggested by Brian.
---
opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties | 7 ++-
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java | 53 +++++++++++++++++++++++++-
opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java | 2
3 files changed, 56 insertions(+), 6 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java
index 61e2bb2..7f50479 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java
@@ -220,10 +220,59 @@
String[] urls = getJarUrls();
String[] versions = getJarVersions();
+ /*
+ * Calculate the percentages that correspond to each file.
+ * TODO ideally this should be done dynamically, but as this is just
+ * to provide progress, updating this information from time to time can
+ * be enough and does not complexify the build process.
+ */
+ int[] percentageMax = new int[urls.length];
+ int[] ratios = new int[urls.length];
+ int totalRatios = 0;
+ for (int i=0; i<percentageMax.length; i++)
+ {
+ int ratio;
+ if (urls[i].endsWith("OpenDS.jar"))
+ {
+ ratio = 23;
+ }
+ else if (urls[i].endsWith("je.jar"))
+ {
+ ratio = 11;
+ }
+ else if (urls[i].endsWith("zipped.jar"))
+ {
+ ratio = 110;
+ }
+ else
+ {
+ ratio = (100 / urls.length);
+ }
+ ratios[i] = ratio;
+ totalRatios += ratio;
+ }
+
+ for (int i=0; i<percentageMax.length; i++)
+ {
+ int r = 0;
+ for (int j=0; j<=i; j++)
+ {
+ r += ratios[j];
+ }
+ percentageMax[i] = (100 * r)/totalRatios;
+ }
+
+
for (int i = 0; i < urls.length && (getException() == null); i++)
{
- currentPercMin = (100 * i) / urls.length;
- currentPercMax = (100 * (i + 1)) / urls.length;
+ if (i == 0)
+ {
+ currentPercMin = 0;
+ }
+ else {
+ currentPercMin = percentageMax[i-1];
+ }
+ currentPercMax = percentageMax[i];
// determine if a particular resource is cached
String sUrl = urls[i];
diff --git a/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties b/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
index 140b26b..a465cb9 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
+++ b/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
@@ -184,7 +184,7 @@
and running quickly.<br><br>If you are running this tool via Java Web Start, \
QuickSetup will install and configure the latest weekly build. You can also \
use QuickSetup to set up a weekly build you have downloaded manually. To run \
-QuickSetup in this case, use the quicksetup command at the top level of the \
+QuickSetup in this case, use the setup command at the top level of the \
OpenDS directory. This instance of QuickSetup will use the following OpenDS \
build: {0} (Build ID: {1}) <br><br> \
OpenDS requires a Java SE 5.0 or higher runtime.<br><br> \
@@ -307,8 +307,9 @@
Data...
summary-starting=Starting Directory Server...
summary-finished-successfully=<b>OpenDS QuickSetup completed successfully.</b>\
-<br> Visit the <a href="https://opends.dev.java.net/public/docs/index.html"> \
-documentation depot</a> page for guidance on server management and \
+<br> Visit the \
+<a href="https://opends.dev.java.net/public/docs/user-docs/OpenDS-QuickReference.html"> \
+OpenDS Quick Reference</a> page for an overview of server management and \
configuration.
summary-finished-with-error=An error occurred. Check 'Details' text area for \
more information.
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java b/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
index 0191168..517c871 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
@@ -191,7 +191,7 @@
/**
* Specifies the number of columns of a text field for a relative path.
*/
- public static final int RELATIVE_PATH_FIELD_SIZE = 5;
+ public static final int RELATIVE_PATH_FIELD_SIZE = 10;
/**
* Specifies the number of columns of a text field for a port.
--
Gitblit v1.10.0