</action>
</actions>
<formComponents>
+ <formComponent id="3028" beanClass="com.install4j.runtime.beans.formcomponents.MultilineHtmlLabelComponent" insetBottom="16">
+ <serializedBean>
+ <property name="labelHtml" type="string"><strong>Administrator mode</strong></property>
+ </serializedBean>
+ <visibilityScript>context.getBooleanVariable("isAdmin")</visibilityScript>
+ </formComponent>
<formComponent id="3" beanClass="com.install4j.runtime.beans.formcomponents.MultilineLabelComponent">
<serializedBean>
<property name="labelText" type="string">${form:welcomeMessage}</property>
FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+
+
// get boolean status of "Enable advanced options" checkbox
JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
boolean advancedOptions = jcb_advancedOptions.isSelected();
-// get boolean status of "Allow user-space updates" checkbox
-JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
-boolean userUpdates = jcb_user.isSelected();
-
-// get boolean status of "Allow installation updates" checkbox
-JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
-boolean installerUpdates = jcb_installer.isSelected();
-
-// get boolean status of "Customise the user-space path" checkbox
-JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
-boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
-
-// get String value of userAppdirPath text field
-JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
-String userAppdirPath = jtf_userAppdirPath.getText();
-
-// set visibility of all "ADVANCEDITEM" components (does not include groups)
+// set visibility of all "ADVANCEDITEM" components (does not include groups) and layout groups
for (FormComponent fc: formEnvironment.getFormComponents()) {
String id = formEnvironment.getId(fc);
if (id.contains("ADVANCEDITEM")) {
fc.setVisible(advancedOptions);
}
}
-// set visibility of customised user appdir path group (checkbox and text field)
lg.setVisible(advancedOptions);
-// set enabled of userAppdirPath text field
-fc_userAppdirPath.setEnabled(advancedOptions && allowUserAppdirPath);
+if (!advancedOptions) {
+ return;
+}
+
+
+// get boolean status of "Allow user-space updates" checkbox
+JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
+boolean userUpdates = jcb_user.isSelected();
// set enabled of customised user appdir path group
lg.setEnabled(advancedOptions && userUpdates);
// set enabled of allow installation updates checkbox
-fc_installerUpdates.setEnabled(!userUpdates);
+fc_installerUpdates.setEnabled(advancedOptions && !userUpdates);
+
+
+
+// get boolean status of "Customise the user-space path" checkbox
+JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
+boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
+
+// set enabled of userAppdirPath text field
+fc_userAppdirPath.setEnabled(advancedOptions && allowUserAppdirPath && fc_allowUserAppdirPath.isEnabled());
+
+
+
+// get boolean status of "Allow installation updates" checkbox
+JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
+boolean installerUpdates = jcb_installer.isSelected();
// should we show the No updates warning?
boolean showWarning = advancedOptions && !(userUpdates || installerUpdates);
FormComponent fc_warning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
fc_warning.setVisible(showWarning);
-</property>
+
+
+
+// get String value of userAppdirPath text field
+JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
+String userAppdirPath = jtf_userAppdirPath.getText();
+// not using this yet</property>
</object>
</property>
<property name="variableName" type="string">advancedOptions</property>
FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+
+
// get boolean status of "Enable advanced options" checkbox
JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
boolean advancedOptions = jcb_advancedOptions.isSelected();
-// get boolean status of "Allow user-space updates" checkbox
-JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
-boolean userUpdates = jcb_user.isSelected();
-
-// get boolean status of "Allow installation updates" checkbox
-JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
-boolean installerUpdates = jcb_installer.isSelected();
-
-// get boolean status of "Customise the user-space path" checkbox
-JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
-boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
-
-// get String value of userAppdirPath text field
-JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
-String userAppdirPath = jtf_userAppdirPath.getText();
-
-// set visibility of all "ADVANCEDITEM" components (does not include groups)
+// set visibility of all "ADVANCEDITEM" components (does not include groups) and layout groups
for (FormComponent fc: formEnvironment.getFormComponents()) {
String id = formEnvironment.getId(fc);
if (id.contains("ADVANCEDITEM")) {
fc.setVisible(advancedOptions);
}
}
-// set visibility of customised user appdir path group (checkbox and text field)
lg.setVisible(advancedOptions);
-// set enabled of userAppdirPath text field
-fc_userAppdirPath.setEnabled(advancedOptions && allowUserAppdirPath);
+if (!advancedOptions) {
+ return;
+}
+
+
+// get boolean status of "Allow user-space updates" checkbox
+JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
+boolean userUpdates = jcb_user.isSelected();
// set enabled of customised user appdir path group
lg.setEnabled(advancedOptions && userUpdates);
// set enabled of allow installation updates checkbox
-fc_installerUpdates.setEnabled(!userUpdates);
+fc_installerUpdates.setEnabled(advancedOptions && !userUpdates);
+
+
+
+// get boolean status of "Customise the user-space path" checkbox
+JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
+boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
+
+// set enabled of userAppdirPath text field
+fc_userAppdirPath.setEnabled(advancedOptions && allowUserAppdirPath && fc_allowUserAppdirPath.isEnabled());
+
+
+
+// get boolean status of "Allow installation updates" checkbox
+JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
+boolean installerUpdates = jcb_installer.isSelected();
// should we show the No updates warning?
boolean showWarning = advancedOptions && !(userUpdates || installerUpdates);
FormComponent fc_warning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
fc_warning.setVisible(showWarning);
-</property>
+
+
+
+// get String value of userAppdirPath text field
+JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
+String userAppdirPath = jtf_userAppdirPath.getText();
+// not using this yet</property>
</object>
</property>
<property name="variableName" type="string">allowUserDefaultAppdirUpdates</property>
FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+
+
// get boolean status of "Enable advanced options" checkbox
JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
boolean advancedOptions = jcb_advancedOptions.isSelected();
-// get boolean status of "Allow user-space updates" checkbox
-JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
-boolean userUpdates = jcb_user.isSelected();
-
-// get boolean status of "Allow installation updates" checkbox
-JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
-boolean installerUpdates = jcb_installer.isSelected();
-
-// get boolean status of "Customise the user-space path" checkbox
-JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
-boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
-
-// get String value of userAppdirPath text field
-JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
-String userAppdirPath = jtf_userAppdirPath.getText();
-
-// set visibility of all "ADVANCEDITEM" components (does not include groups)
+// set visibility of all "ADVANCEDITEM" components (does not include groups) and layout groups
for (FormComponent fc: formEnvironment.getFormComponents()) {
String id = formEnvironment.getId(fc);
if (id.contains("ADVANCEDITEM")) {
fc.setVisible(advancedOptions);
}
}
-// set visibility of customised user appdir path group (checkbox and text field)
lg.setVisible(advancedOptions);
-// set enabled of userAppdirPath text field
-fc_userAppdirPath.setEnabled(advancedOptions && allowUserAppdirPath);
+if (!advancedOptions) {
+ return;
+}
+
+
+// get boolean status of "Allow user-space updates" checkbox
+JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
+boolean userUpdates = jcb_user.isSelected();
// set enabled of customised user appdir path group
lg.setEnabled(advancedOptions && userUpdates);
// set enabled of allow installation updates checkbox
-fc_installerUpdates.setEnabled(!userUpdates);
+fc_installerUpdates.setEnabled(advancedOptions && !userUpdates);
+
+
+
+// get boolean status of "Customise the user-space path" checkbox
+JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
+boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
+
+// set enabled of userAppdirPath text field
+fc_userAppdirPath.setEnabled(advancedOptions && allowUserAppdirPath && fc_allowUserAppdirPath.isEnabled());
+
+
+
+// get boolean status of "Allow installation updates" checkbox
+JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
+boolean installerUpdates = jcb_installer.isSelected();
// should we show the No updates warning?
boolean showWarning = advancedOptions && !(userUpdates || installerUpdates);
FormComponent fc_warning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
fc_warning.setVisible(showWarning);
-</property>
+
+
+
+// get String value of userAppdirPath text field
+JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
+String userAppdirPath = jtf_userAppdirPath.getText();
+// not using this yet</property>
</object>
</property>
<property name="variableName" type="string">allowSetUserAppdirPath</property>
FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+
+
// get boolean status of "Enable advanced options" checkbox
JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
boolean advancedOptions = jcb_advancedOptions.isSelected();
-// get boolean status of "Allow user-space updates" checkbox
-JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
-boolean userUpdates = jcb_user.isSelected();
-
-// get boolean status of "Allow installation updates" checkbox
-JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
-boolean installerUpdates = jcb_installer.isSelected();
-
-// get boolean status of "Customise the user-space path" checkbox
-JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
-boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
-
-// get String value of userAppdirPath text field
-JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
-String userAppdirPath = jtf_userAppdirPath.getText();
-
-// set visibility of all "ADVANCEDITEM" components (does not include groups)
+// set visibility of all "ADVANCEDITEM" components (does not include groups) and layout groups
for (FormComponent fc: formEnvironment.getFormComponents()) {
String id = formEnvironment.getId(fc);
if (id.contains("ADVANCEDITEM")) {
fc.setVisible(advancedOptions);
}
}
-// set visibility of customised user appdir path group (checkbox and text field)
lg.setVisible(advancedOptions);
-// set enabled of userAppdirPath text field
-fc_userAppdirPath.setEnabled(advancedOptions && allowUserAppdirPath);
+if (!advancedOptions) {
+ return;
+}
+
+
+// get boolean status of "Allow user-space updates" checkbox
+JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
+boolean userUpdates = jcb_user.isSelected();
// set enabled of customised user appdir path group
lg.setEnabled(advancedOptions && userUpdates);
// set enabled of allow installation updates checkbox
-fc_installerUpdates.setEnabled(!userUpdates);
+fc_installerUpdates.setEnabled(advancedOptions && !userUpdates);
+
+
+
+// get boolean status of "Customise the user-space path" checkbox
+JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
+boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
+
+// set enabled of userAppdirPath text field
+fc_userAppdirPath.setEnabled(advancedOptions && allowUserAppdirPath && fc_allowUserAppdirPath.isEnabled());
+
+
+
+// get boolean status of "Allow installation updates" checkbox
+JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
+boolean installerUpdates = jcb_installer.isSelected();
// should we show the No updates warning?
boolean showWarning = advancedOptions && !(userUpdates || installerUpdates);
FormComponent fc_warning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
fc_warning.setVisible(showWarning);
-</property>
+
+
+
+// get String value of userAppdirPath text field
+JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
+String userAppdirPath = jtf_userAppdirPath.getText();
+// not using this yet</property>
</object>
</property>
<property name="variableName" type="string">allowInstallerAppdirUpdates</property>