JAL-3631 Improved tooltip on advanced options. Ensure empty box/border isn't displaye...
authorBen Soares <b.soares@dundee.ac.uk>
Sun, 21 Jul 2024 19:32:59 +0000 (20:32 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Sun, 21 Jul 2024 19:32:59 +0000 (20:32 +0100)
utils/install4j/install4j10_template.install4j

index 119c1d8..927dd4a 100644 (file)
@@ -855,6 +855,7 @@ formEnvironment.getFormComponentById("US_NO_UPDATES_WARNING").setVisible(showWar
                   <property name="selectionScript">
                     <object class="com.install4j.api.beans.ScriptProperty">
                       <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+FormComponent fc_notUsed = formEnvironment.getFormComponentById("SS_NOT_USED");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
@@ -870,6 +871,7 @@ boolean advancedOptions = jcb_advancedOptions.isSelected();
 
 // set visibility of Advanced options layout group
 lg_advancedGroup.setVisible(advancedOptions);
+fc_notUsed.setVisible(!advancedOptions);
 
 if (!advancedOptions) {
   return;
@@ -934,24 +936,25 @@ jb_setDefaults.setEnabled(enableSetDefaults);</property>
                   <property name="variableName" type="string">advancedOptions</property>
                 </serializedBean>
               </formComponent>
-              <group name="Advanced options group" id="3030" customizedId="SS_ADVANCED_OPTIONS_GROUP" beanClass="com.install4j.runtime.beans.groups.VerticalFormComponentGroup">
+              <formComponent name="Advanced options not used label" id="3032" customizedId="SS_NOT_USED" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="20">
                 <serializedBean>
-                  <property name="borderSides">
-                    <object class="com.install4j.runtime.beans.formcomponents.BorderSides">
-                      <property name="bottom" type="boolean" value="true" />
-                      <property name="left" type="boolean" value="true" />
-                      <property name="right" type="boolean" value="true" />
-                      <property name="top" type="boolean" value="true" />
-                    </object>
-                  </property>
-                  <property name="insets">
-                    <object class="java.awt.Insets">
-                      <int>4</int>
-                      <int>4</int>
-                      <int>4</int>
-                      <int>4</int>
+                  <property name="labelColor">
+                    <object class="java.awt.Color">
+                      <int>128</int>
+                      <int>128</int>
+                      <int>128</int>
+                      <int>255</int>
                     </object>
                   </property>
+                  <property name="labelFontSizePercent" type="int" value="80" />
+                  <property name="labelFontType" type="enum" class="com.install4j.runtime.beans.formcomponents.FontType" value="DERIVED" />
+                  <property name="labelText" type="string">Advanced options will not be used</property>
+                </serializedBean>
+                <visibilityScript>!context.getBooleanVariable("advancedOptions")
+</visibilityScript>
+              </formComponent>
+              <group name="Advanced options (outer) group" id="3033" customizedId="SS_ADVANCED_OPTIONS_GROUP" beanClass="com.install4j.runtime.beans.groups.VerticalFormComponentGroup">
+                <serializedBean>
                   <property name="visibilityScript">
                     <object class="com.install4j.api.beans.ScriptProperty">
                       <property name="value" type="string">context.getBooleanVariable("advancedOptions")
@@ -960,19 +963,44 @@ jb_setDefaults.setEnabled(enableSetDefaults);</property>
                   </property>
                 </serializedBean>
                 <beans>
-                  <formComponent name="Strongly recommended text" id="2985" customizedId="SS_LABEL_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.MultilineHtmlLabelComponent" insetLeft="16">
+                  <group name="Advanced options boxed group" id="3030" beanClass="com.install4j.runtime.beans.groups.VerticalFormComponentGroup">
                     <serializedBean>
-                      <property name="labelHtml" type="string">&lt;html&gt;The following options are &lt;strong&gt;strongly recommended&lt;/strong&gt; to be left as default unless there is a particular reason to change them.&lt;/html&gt;</property>
-                    </serializedBean>
-                  </formComponent>
-                  <formComponent id="3013" customizedId="SS_VSPACE_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.SpacerComponent" insetLeft="16" />
-                  <formComponent name="BOTHSPACE: Allow automatic updates in user's home directory" id="2986" customizedId="SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetLeft="16">
-                    <serializedBean>
-                      <property name="checkboxText" type="string">Allow user-space updates for ${compiler:JALVIEW_APPLICATION_NAME} components</property>
-                      <property name="coupledComponentIds">
-                        <add type="string">3021</add>
+                      <property name="borderSides">
+                        <object class="com.install4j.runtime.beans.formcomponents.BorderSides">
+                          <property name="bottom" type="boolean" value="true" />
+                          <property name="left" type="boolean" value="true" />
+                          <property name="right" type="boolean" value="true" />
+                          <property name="top" type="boolean" value="true" />
+                        </object>
                       </property>
-                      <property name="helpText" type="string">&lt;html&gt;This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME}
+                      <property name="insets">
+                        <object class="java.awt.Insets">
+                          <int>4</int>
+                          <int>4</int>
+                          <int>4</int>
+                          <int>4</int>
+                        </object>
+                      </property>
+                      <property name="visibilityScript">
+                        <object class="com.install4j.api.beans.ScriptProperty">
+                          <property name="value" type="string" />
+                        </object>
+                      </property>
+                    </serializedBean>
+                    <beans>
+                      <formComponent name="Strongly recommended text" id="2985" customizedId="SS_LABEL_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.MultilineHtmlLabelComponent" insetLeft="16">
+                        <serializedBean>
+                          <property name="labelHtml" type="string">&lt;html&gt;The following options are &lt;strong&gt;strongly recommended&lt;/strong&gt; to be left as default unless there is a particular reason to change them.&lt;/html&gt;</property>
+                        </serializedBean>
+                      </formComponent>
+                      <formComponent id="3013" customizedId="SS_VSPACE_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.SpacerComponent" insetLeft="16" />
+                      <formComponent name="BOTHSPACE: Allow automatic updates in user's home directory" id="2986" customizedId="SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetLeft="16">
+                        <serializedBean>
+                          <property name="checkboxText" type="string">Allow user-space updates for ${compiler:JALVIEW_APPLICATION_NAME} components</property>
+                          <property name="coupledComponentIds">
+                            <add type="string">3021</add>
+                          </property>
+                          <property name="helpText" type="string">&lt;html&gt;This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME}
 &lt;br&gt;
 components to be automatically downloaded
 &lt;br&gt;
@@ -987,10 +1015,10 @@ On ${installer:osName}, user updates will be installed under
 &lt;pre&gt;${installer:userDefaultAppdirBase}&lt;/pre&gt;
 unless customised below.
 &lt;/html&gt;</property>
-                      <property name="initiallySelected" type="boolean" value="true" />
-                      <property name="selectionScript">
-                        <object class="com.install4j.api.beans.ScriptProperty">
-                          <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                          <property name="initiallySelected" type="boolean" value="true" />
+                          <property name="selectionScript">
+                            <object class="com.install4j.api.beans.ScriptProperty">
+                              <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
@@ -1065,34 +1093,34 @@ FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFA
 JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
 boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
 jb_setDefaults.setEnabled(enableSetDefaults);</property>
-                        </object>
-                      </property>
-                      <property name="variableName" type="string">allowUserDefaultAppdirUpdates</property>
-                    </serializedBean>
-                  </formComponent>
-                  <group name="SYSTEMSPACE: Customise user appDir path" id="3021" customizedId="SS_SET_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.groups.HorizontalFormComponentGroup">
-                    <serializedBean>
-                      <property name="insets">
-                        <object class="java.awt.Insets">
-                          <int>0</int>
-                          <int>32</int>
-                          <int>0</int>
-                          <int>0</int>
-                        </object>
-                      </property>
-                      <property name="visibilityScript">
-                        <object class="com.install4j.api.beans.ScriptProperty">
-                          <property name="value" type="string" />
-                        </object>
-                      </property>
-                    </serializedBean>
-                    <beans>
-                      <formComponent name="SYSTEMSPACE: Allow setting userAppdirPath" id="3022" customizedId="SS_ALLOW_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
+                            </object>
+                          </property>
+                          <property name="variableName" type="string">allowUserDefaultAppdirUpdates</property>
+                        </serializedBean>
+                      </formComponent>
+                      <group name="SYSTEMSPACE: Customise user appDir path" id="3021" customizedId="SS_SET_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.groups.HorizontalFormComponentGroup">
                         <serializedBean>
-                          <property name="checkboxText" type="string">Customise the user-space path</property>
-                          <property name="selectionScript">
+                          <property name="insets">
+                            <object class="java.awt.Insets">
+                              <int>0</int>
+                              <int>32</int>
+                              <int>0</int>
+                              <int>0</int>
+                            </object>
+                          </property>
+                          <property name="visibilityScript">
                             <object class="com.install4j.api.beans.ScriptProperty">
-                              <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                              <property name="value" type="string" />
+                            </object>
+                          </property>
+                        </serializedBean>
+                        <beans>
+                          <formComponent name="SYSTEMSPACE: Allow setting userAppdirPath" id="3022" customizedId="SS_ALLOW_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
+                            <serializedBean>
+                              <property name="checkboxText" type="string">Customise the user-space path</property>
+                              <property name="selectionScript">
+                                <object class="com.install4j.api.beans.ScriptProperty">
+                                  <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
@@ -1167,14 +1195,14 @@ FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFA
 JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
 boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
 jb_setDefaults.setEnabled(enableSetDefaults);</property>
-                            </object>
-                          </property>
-                          <property name="variableName" type="string">allowSetUserAppdirPath</property>
-                        </serializedBean>
-                      </formComponent>
-                      <formComponent name="SYSTEMSPACE: Set userAppdirPath" id="3024" customizedId="SS_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.formcomponents.TextfieldComponent">
-                        <serializedBean>
-                          <property name="helpText" type="string">&lt;html&gt;The base path where individual users' updates
+                                </object>
+                              </property>
+                              <property name="variableName" type="string">allowSetUserAppdirPath</property>
+                            </serializedBean>
+                          </formComponent>
+                          <formComponent name="SYSTEMSPACE: Set userAppdirPath" id="3024" customizedId="SS_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.formcomponents.TextfieldComponent">
+                            <serializedBean>
+                              <property name="helpText" type="string">&lt;html&gt;The base path where individual users' updates
 &lt;br&gt;
 will be stored.
 &lt;br&gt;
@@ -1186,15 +1214,17 @@ The following substitutions will be made:
 &lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;The user's home directory path&lt;/td&gt;&lt;/tr&gt;
 &lt;tr&gt;&lt;td&gt;~&lt;/td&gt;&lt;td&gt;(at start) The user's home directory path&lt;/td&gt;&lt;/tr&gt;
 &lt;/table&gt;
-At least one of the above substitutions should be used.
+At least one of the above substitutions should be
+&lt;br&gt;
+used, e.g. &lt;tt&gt;/tmp/${compiler:UNIX_APPLICATION_FOLDER}/%u/app&lt;/tt&gt;
 &lt;br&gt;
 The default value on ${installer:osName} is
 &lt;br&gt;
 &lt;pre&gt;${installer:userDefaultAppdirBase}&lt;/pre&gt;
 &lt;/html&gt;</property>
-                          <property name="inputVerifier">
-                            <object class="com.install4j.api.beans.ScriptProperty">
-                              <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                              <property name="inputVerifier">
+                                <object class="com.install4j.api.beans.ScriptProperty">
+                                  <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
@@ -1273,11 +1303,11 @@ jb_setDefaults.setEnabled(enableSetDefaults);
 
 
 return true;</property>
-                            </object>
-                          </property>
-                          <property name="keyListener">
-                            <object class="com.install4j.api.beans.ScriptProperty">
-                              <property name="value" type="string">// get String value of userAppdirPath text field
+                                </object>
+                              </property>
+                              <property name="keyListener">
+                                <object class="com.install4j.api.beans.ScriptProperty">
+                                  <property name="value" type="string">// get String value of userAppdirPath text field
 FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
 JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
 String userAppdirPath = jtf_userAppdirPath.getText();
@@ -1289,16 +1319,16 @@ boolean showInvalidPathWarning = !( userAppdirPath.length() == 0 || u || h || t
 FormComponent fc_invalidPathWarning = formEnvironment.getFormComponentById("SS_INVALID_USER_APPDIR_PATH_WARNING");
 fc_invalidPathWarning.setVisible(showInvalidPathWarning);
 </property>
-                            </object>
-                          </property>
-                          <property name="keyValidator">
-                            <object class="com.install4j.api.beans.ScriptProperty">
-                              <property name="value" type="string" />
-                            </object>
-                          </property>
-                          <property name="variableName" type="string">userAppdirPath</property>
-                        </serializedBean>
-                        <initScript>FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                                </object>
+                              </property>
+                              <property name="keyValidator">
+                                <object class="com.install4j.api.beans.ScriptProperty">
+                                  <property name="value" type="string" />
+                                </object>
+                              </property>
+                              <property name="variableName" type="string">userAppdirPath</property>
+                            </serializedBean>
+                            <initScript>FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
@@ -1311,13 +1341,13 @@ JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfig
 boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
 
 configurationObject.setEnabled(userUpdates &amp;&amp; allowUserAppdirPath);</initScript>
-                      </formComponent>
-                    </beans>
-                  </group>
-                  <formComponent name="SYSTEMSPACE: Allow automatic updates in the installation directory" id="2974" customizedId="SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetLeft="16">
-                    <serializedBean>
-                      <property name="checkboxText" type="string">Allow installation updates for ${compiler:JALVIEW_APPLICATION_NAME} components</property>
-                      <property name="helpText" type="string">&lt;html&gt;This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME}
+                          </formComponent>
+                        </beans>
+                      </group>
+                      <formComponent name="SYSTEMSPACE: Allow automatic updates in the installation directory" id="2974" customizedId="SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetLeft="16">
+                        <serializedBean>
+                          <property name="checkboxText" type="string">Allow installation updates for ${compiler:JALVIEW_APPLICATION_NAME} components</property>
+                          <property name="helpText" type="string">&lt;html&gt;This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME}
 &lt;br&gt;
 components to be automatically downloaded
 &lt;br&gt;
@@ -1340,9 +1370,9 @@ Installation updates will be installed into
 &lt;br&gt;
 &lt;pre&gt;${installer:sys.contentDir}&lt;/pre&gt;
 &lt;/html&gt;</property>
-                      <property name="selectionScript">
-                        <object class="com.install4j.api.beans.ScriptProperty">
-                          <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                          <property name="selectionScript">
+                            <object class="com.install4j.api.beans.ScriptProperty">
+                              <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
@@ -1417,16 +1447,16 @@ FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFA
 JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
 boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
 jb_setDefaults.setEnabled(enableSetDefaults);</property>
-                        </object>
-                      </property>
-                      <property name="variableName" type="string">allowInstallerAppdirUpdates</property>
-                    </serializedBean>
-                  </formComponent>
-                  <formComponent name="Set defaults" id="3029" customizedId="SS_SET_DEFAULTS_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.ButtonComponent" insetTop="8" insetLeft="16">
-                    <serializedBean>
-                      <property name="actionScript">
-                        <object class="com.install4j.api.beans.ScriptProperty">
-                          <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                            </object>
+                          </property>
+                          <property name="variableName" type="string">allowInstallerAppdirUpdates</property>
+                        </serializedBean>
+                      </formComponent>
+                      <formComponent name="Set defaults" id="3029" customizedId="SS_SET_DEFAULTS_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.ButtonComponent" insetTop="8" insetLeft="16">
+                        <serializedBean>
+                          <property name="actionScript">
+                            <object class="com.install4j.api.beans.ScriptProperty">
+                              <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
@@ -1511,11 +1541,11 @@ FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFA
 JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
 boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
 jb_setDefaults.setEnabled(enableSetDefaults);</property>
-                        </object>
-                      </property>
-                      <property name="buttonText" type="string">Reset advanced options to defaults</property>
-                    </serializedBean>
-                    <initScript>FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                            </object>
+                          </property>
+                          <property name="buttonText" type="string">Reset advanced options to defaults</property>
+                        </serializedBean>
+                        <initScript>FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
@@ -1539,35 +1569,37 @@ FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFA
 JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
 boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
 jb_setDefaults.setEnabled(enableSetDefaults);</initScript>
-                  </formComponent>
-                  <formComponent name="BOTHSPACE: No updates warning" id="2988" customizedId="SS_NO_UPDATES_WARNING" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="16">
-                    <serializedBean>
-                      <property name="labelIconFile">
-                        <object class="com.install4j.api.beans.ExternalFile">
-                          <string>${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png</string>
-                        </object>
-                      </property>
-                      <property name="labelText" type="string">No automatic updates will occur when ${compiler:JALVIEW_APPLICATION_NAME} is launched</property>
-                    </serializedBean>
-                    <visibilityScript>!(
+                      </formComponent>
+                      <formComponent name="BOTHSPACE: No updates warning" id="2988" customizedId="SS_NO_UPDATES_WARNING" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="16">
+                        <serializedBean>
+                          <property name="labelIconFile">
+                            <object class="com.install4j.api.beans.ExternalFile">
+                              <string>${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png</string>
+                            </object>
+                          </property>
+                          <property name="labelText" type="string">No automatic updates will occur when ${compiler:JALVIEW_APPLICATION_NAME} is launched</property>
+                        </serializedBean>
+                        <visibilityScript>!(
   context.getBooleanVariable("allowUserDefaultAppdirUpdates")
   || context.getBooleanVariable("allowInstallerAppdirUpdates")
 )</visibilityScript>
-                  </formComponent>
-                  <formComponent name="SYSTEMSPACE: Invalid user-space path warning" id="3027" customizedId="SS_INVALID_USER_APPDIR_PATH_WARNING" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="16">
-                    <serializedBean>
-                      <property name="labelIconFile">
-                        <object class="com.install4j.api.beans.ExternalFile">
-                          <string>${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png</string>
-                        </object>
-                      </property>
-                      <property name="labelText" type="string">The user-space path should contain one of "~" (at the start), "%u" or "%h"</property>
-                    </serializedBean>
-                    <visibilityScript>!(
+                      </formComponent>
+                      <formComponent name="SYSTEMSPACE: Invalid user-space path warning" id="3027" customizedId="SS_INVALID_USER_APPDIR_PATH_WARNING" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="16">
+                        <serializedBean>
+                          <property name="labelIconFile">
+                            <object class="com.install4j.api.beans.ExternalFile">
+                              <string>${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png</string>
+                            </object>
+                          </property>
+                          <property name="labelText" type="string">The user-space path should contain one of "~" (at the start), "%u" or "%h"</property>
+                        </serializedBean>
+                        <visibilityScript>!(
   context.getBooleanVariable("allowUserDefaultAppdirUpdates")
   || context.getBooleanVariable("allowInstallerAppdirUpdates")
 )</visibilityScript>
-                  </formComponent>
+                      </formComponent>
+                    </beans>
+                  </group>
                 </beans>
               </group>
             </formComponents>