[izpack-changes] r1559 - in izpack-src/trunk/src: dist-files doc-ng/XHTML lib/com/izforge/izpack/installer

noreply at berlios.de noreply at berlios.de
Mon Sep 4 17:46:19 CEST 2006


Author: bartzkau
Date: 2006-09-04 17:46:18 +0200 (Mon, 04 Sep 2006)
New Revision: 1559

Modified:
   izpack-src/trunk/src/dist-files/IzPack-install.xml
   izpack-src/trunk/src/doc-ng/XHTML/node5.html
   izpack-src/trunk/src/lib/com/izforge/izpack/installer/InstallerFrame.java
Log:
Panel counter also if no heading is used; docu for layout modifier;
layout modifier in the and support of registry in the standard installation 
description file.


Modified: izpack-src/trunk/src/dist-files/IzPack-install.xml
===================================================================
--- izpack-src/trunk/src/dist-files/IzPack-install.xml	2006-09-04 01:15:41 UTC (rev 1558)
+++ izpack-src/trunk/src/dist-files/IzPack-install.xml	2006-09-04 15:46:18 UTC (rev 1559)
@@ -50,6 +50,14 @@
         <laf name="looks">
             <os family="unix"/>
         </laf>
+        <!-- GUI addaption for more informations see "Modifying the GUI" in the documentation -->
+    	<modifier key="layoutAnchor" value="CENTER"/>
+    	<modifier key="headingPanelCounter" value="text"/>
+		<modifier key="headingPanelCounterPos" value="inNavigationPanel"/>
+		<modifier key="allYGap" value="3"/>
+		<modifier key="paragraphYGap" value="10"/>	
+		<modifier key="filler1YGap" value="5"/>
+		<modifier key="filler3XGap" value="10"/>
     </guiprefs>
 
     <variables>
@@ -110,11 +118,12 @@
         <res src="border6.png" id="Installer.image.6"/>
         <res src="border7.png" id="Installer.image.7"/>
         <res src="border8.png" id="Installer.image.8"/>
+        <res src="RegistrySpec.xml" id="RegistrySpec.xml"/>
     </resources>
 
     <!-- The panels in a classic order -->
     <panels>
-        <panel classname="HelloPanel"/>
+        <panel classname="CheckedHelloPanel"/>
         <panel classname="HTMLInfoPanel"/>
         <panel classname="LicencePanel"/>
         <panel classname="TargetPanel"/>
@@ -132,6 +141,9 @@
     <!-- The listeners section for CustomActions -->
     <listeners>
         <listener installer="SummaryLoggerInstallerListener"/>
+        <listener installer="RegistryInstallerListener" uninstaller="RegistryUninstallerListener">
+            <os family="windows"/>
+        </listener>
     </listeners>
 
     <!-- The packs section -->

Modified: izpack-src/trunk/src/doc-ng/XHTML/node5.html
===================================================================
--- izpack-src/trunk/src/doc-ng/XHTML/node5.html	2006-09-04 01:15:41 UTC (rev 1558)
+++ izpack-src/trunk/src/doc-ng/XHTML/node5.html	2006-09-04 15:46:18 UTC (rev 1559)
@@ -298,48 +298,104 @@
       <li>
         <tt>layoutAnchor</tt>:<br />
         layout anchor for IzPanels. Valid are "NORTH", "NORTHWEST", "SOUTHWEST", "SOUTH" and
-        "CENTER". Only panels which are using the GridBagLayout helper methods of IzPanels are
-        supported. These are not all standard panels.
+        "CENTER". Only panels which are using the layout helper of IzPanels are
+        supported. These are not all standard panels. At developing custom panels it is
+		recommended to use the layout helper with an IzPanelLayout.
       </li>
-
       <li>
-        <tt>noGap</tt>:<br />
-        used by some panels as distance between the panel top border and the first control.
+	    <tt>Gaps</tt>:<br />
+		there are defined different gaps between different components of a IzPanel if
+		using IzPanelLayout. The gaps can be set also via the element &lt;modifier&gt; of
+		<a href="node4.html#SECTION00434000000000000000">&lt;guprefs&gt;</a>. It is
+		possible to declare different values for X and Y axis. This will be determined
+		in the key word name. X Gaps are insert after Y gaps under the control for which
+		the gap was declared.  
+		  
+		Following key words are defined:
+		<ul>
+		  <li>
+		    <tt>labelXGap</tt> | <tt>labelYGap</tt>:<br />
+			gap in pixel between two labels in X or Y direction.
+		  </li>
+		  <li>
+		    <tt>textXGap</tt> | <tt>textYGap</tt>:<br />
+			gap in pixel between two text fields.
+		  </li>
+		  <li>
+		    <tt>controlXGap</tt> | <tt>controlYGap</tt>:<br />
+			gap in pixel between two controls other than label or textfield.
+		  </li>
+		  <li>
+		    <tt>paragraphYGap</tt>:<br />
+			gap in pixel for a pragraph. A paragraph will be created in the panel
+			source for controls which should be separated. paragraphXGap is
+			declared, but not used.
+		  </li>
+		  <li>
+		    <tt>labelToTextXGap</tt> | <tt>labelToTextYGap</tt>:<br />
+			gap in pixel between a label (left or top) and a text field (right or bottom).
+		  </li>
+		  <li>
+		    <tt>labelToControlXGap</tt> | <tt>labelToControlYGap</tt>:<br />
+			gap in pixel between a label (left or top) and a control other than a label or a textfield.
+		  </li>
+		  <li>
+		    <tt>textToLabelXGap</tt> | <tt>textToLabelYGap</tt>:<br />
+			gap in pixel between a text field (left or top) and a label.
+		  </li>
+		  <li>
+		    <tt>controlToLabelXGap</tt> | <tt>controlToLabelYGap</tt>:<br />
+			gap in pixel between a control other than a label or a text field and a label.
+		  </li>
+		  <li>
+		    <tt>controlToTextXGap</tt> | <tt>controlToTextYGap</tt>:<br />
+			gap in pixel between  a control other than a label or a text field and a text field.
+		  </li>
+		  <li>
+		    <tt>textToControlXGap</tt> | <tt>textToControlYGap</tt>:<br />
+			gap in pixel between a text field and a control other than a label or a text field .
+		  </li>
+		  <li>
+		    <tt>firstYGap</tt>:<br />
+			gap in pixel between the top border and the first control.
+		  </li>
+		  <li>
+		    <tt>filler[N]XGap</tt> | <tt>filler[N]YGap</tt>:<br />
+			gap in pixel created by the layout manager. Filler are used by some panels.
+			[N] is a number between 1 and 5 to allow to use different filler e.g.
+			filler3XGap or filler1YGap.
+		  </li>
+		  <li>
+		    <tt>allXGap</tt> | <tt>allYGap</tt>:<br />
+			gap in pixel between all controls in X or Y direction. If this is declared
+			all gaps for which no own declaration exists gets this value. If a gap
+			has an own declaration this will be used instead. 
+		  </li>
+		</ul>
       </li>
-
-      <li>
-        <tt>labelGap</tt>:<br />
-        standard gap between labels (in reality this will be a header over the label). Only panels
-        which are using the IzPack factory for labels are supported. These are not all standard
-        panels.
-      </li>
-
-      <li>
-        <tt>paragraphGap</tt>:<br />
-        used by some panels as distance between paragraphs or controls which should have
-		more gap as normal labels.
-      </li>
-
-      <li>
-        <tt>labelToTextGap</tt>:<br />
-        used by some panels as distance between labels and text fields.
-      </li>
-
-      <li>
-        <tt>labelToControlGap</tt>:<br />
-        used by some panels as distance between labels and controls like combo boxes,
-		radio buttons, check boxes.
-      </li>
-
-      <li>
-        <tt>textToLabelGap</tt>:<br />
-        used by some panels as distance between text fields and labels.
-      </li>
-
-      <li>
-        <tt>controlToLabelGap</tt>:<br />
-        used by some panels as distance between controls and labels.
-      </li>
+	  <li>
+	    <a name="layoutStretchType"></a><tt>layoutYStretchType</tt> | <tt>layoutXStretchType</tt>:<br />
+		The IzPanelLayout manager allows to declare stretch factors for controls.
+		This means, that a control will be stratched if there is place in the line.
+		The amount of stretching will be determined by the stretch factor. But 
+		what todo if the hole stretch factor for a line or column is not 1.0?
+		To determine this these settings are exist. Valid values are "RELATIVE",
+		"ABSOLUTE" and "NO". With "NO" no stretch will be performed. with 
+		"RELATIVE" the values are normalized, with "ABSOLUTE" the values will be
+		used as they are (may be a part will be clipped if the sum is greater
+		than 1.0). 
+	  </li>
+	  <li>
+	    <tt>layoutFullLineStretch</tt> | <tt>layoutFullColumnStretch</tt>:<br />
+		As <a href="#layoutStretchType">described</a> there are controls which 
+		should be stretched. Beside fixed values there are the symbolic values
+		FULL_LINE_STRETCH and FULL_COLUMN_STRETCH which are computed at layouting.
+		E.g. MultiLineLabels has this stretch factor for x direction. But what
+		todo if a centered layout is chosen? With a control like this the lines
+		will be stretch to the hole size. With this settings it can be changed.
+		E.g. a factor of 0.7 creates a nice centered layout. The default is 1.0,
+		valid are 0.0 upto 1.0.
+	  </li>
     </ul>
 	<p>It is possible to use an alternatively frame title. Normaly the title has the aspect
 	"IzPack - Installation of " + $APP_NAME. If the langpack key <tt>installer.reversetitle</tt>
@@ -384,7 +440,12 @@
         generell switch for heading. If this key does not exist or does not have the value "yes" no
         heading panel will be shown.
       </li>
-
+	  <li>
+        <tt>useHeadingForSummary</tt>:<br />
+		in the language files there are entries for the heading text ([Panel name].headline)
+		and the summary caption ([Panel name].summaryCaption). If this modifier is set to "yes",
+		the text of the heading will be also used for the summary caption.
+	  </li>
       <li>
         <tt>headingLineCount</tt>:<br />
         number of heading lines. If no info lines should be shown the value should be one (not
@@ -410,7 +471,8 @@
       <li>
         <tt>headingPanelCounterPos</tt>:<br />
         declares where the counter will be shown. Possible are "inHeading" or
-        "inNavigationPanel".
+        "inNavigationPanel". If "inNavigationPanel" is chosen, the panel counter can be
+		used also no heading was selected. 
       </li>
     </ul>
 

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/installer/InstallerFrame.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/installer/InstallerFrame.java	2006-09-04 01:15:41 UTC (rev 1558)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/installer/InstallerFrame.java	2006-09-04 15:46:18 UTC (rev 1559)
@@ -567,6 +567,7 @@
                 }
             }
             performHeading(panel);
+            performHeadingCounter(panel);
             panel.panelActivate();
             panelsContainer.setVisible(true);
             loadAndShowImage(((Integer) visiblePanelMapping.get(installdata.curPanelNumber))
@@ -1258,6 +1259,8 @@
         String counterPos = "inHeading";
         if (installdata.guiPrefs.modifier.containsKey("headingPanelCounterPos"))
             counterPos = (String) installdata.guiPrefs.modifier.get("headingPanelCounterPos");
+        // Do not create counter if it should be in the heading, but no heading should be used.
+        if (leftHeadingPanel == null && "inHeading".equalsIgnoreCase(counterPos)) return;
         if (installdata.guiPrefs.modifier.containsKey("headingPanelCounter"))
         {
             headingCounterComponent = null;
@@ -1325,7 +1328,6 @@
     private void createHeading(JPanel navPanel)
     {
         headingPanel = null;
-        if (!isHeading(null)) return;
         int headingLines = 1;
         // The number of lines can be determined in the config xml file.
         // The first is the header, additonals are descriptions for the header.
@@ -1338,7 +1340,13 @@
         if (installdata.guiPrefs.modifier.containsKey("headingBackgroundColor"))
             back = Color.decode((String) installdata.guiPrefs.modifier
                     .get("headingBackgroundColor"));
-
+        // Try to create counter if no heading should be used.
+        if (!isHeading(null)) 
+        { 
+            createHeadingCounter(back, navPanel, null);
+            return; 
+        }
+        
         // We create the text labels and the needed panels. From inner to outer.
         // Labels
         createHeadingLabels(headingLines, back);
@@ -1425,8 +1433,20 @@
         headingLabels[0].setText(headline);
         headingLabels[0].setVisible(true);
         int curPanelNo = ((Integer) visiblePanelMapping.get(installdata.curPanelNumber)).intValue();
+        if (headingLabels[headingLines] != null)
+        {
+            loadAndShowImage(headingLabels[headingLines], HEADING_ICON_RESOURCE, curPanelNo);
+            headingLabels[headingLines].setVisible(true);
+        }
+        headingPanel.setVisible(true);
+
+    }
+    private void performHeadingCounter(IzPanel panel)
+    {
         if (headingCounterComponent != null)
         {
+            int curPanelNo = ((Integer) visiblePanelMapping.get(installdata.curPanelNumber))
+                    .intValue();
             int visPanelsCount = ((Integer) visiblePanelMapping.get(((Integer) visiblePanelMapping
                     .get(installdata.panels.size())).intValue())).intValue();
 
@@ -1444,12 +1464,5 @@
             else
                 ((JLabel) headingCounterComponent).setText(buf.toString());
         }
-        if (headingLabels[headingLines] != null)
-        {
-            loadAndShowImage(headingLabels[headingLines], HEADING_ICON_RESOURCE, curPanelNo);
-            headingLabels[headingLines].setVisible(true);
-        }
-        headingPanel.setVisible(true);
-
     }
 }




More information about the izpack-changes mailing list