From: Ben Soares Date: Sun, 21 Jul 2024 19:32:59 +0000 (+0100) Subject: JAL-3631 Improved tooltip on advanced options. Ensure empty box/border isn't displaye... X-Git-Tag: Release_2_11_4_0~20^2~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c363b1cd840d992f752b4ddcfa45afda92b94060;p=jalview.git JAL-3631 Improved tooltip on advanced options. Ensure empty box/border isn't displayed when no advanced options. Add message to clarify no Advanced options will be applied when checkbox not ticked. --- diff --git a/utils/install4j/install4j10_template.install4j b/utils/install4j/install4j10_template.install4j index 119c1d8..927dd4a 100644 --- a/utils/install4j/install4j10_template.install4j +++ b/utils/install4j/install4j10_template.install4j @@ -855,6 +855,7 @@ formEnvironment.getFormComponentById("US_NO_UPDATES_WARNING").setVisible(showWar 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); advancedOptions - + - - - - - - - - - - - 4 - 4 - 4 - 4 + + + 128 + 128 + 128 + 255 + + + Advanced options will not be used + + !context.getBooleanVariable("advancedOptions") + + + + context.getBooleanVariable("advancedOptions") @@ -960,19 +963,44 @@ jb_setDefaults.setEnabled(enableSetDefaults); - + - <html>The following options are <strong>strongly recommended</strong> to be left as default unless there is a particular reason to change them.</html> - - - - - - Allow user-space updates for ${compiler:JALVIEW_APPLICATION_NAME} components - - 3021 + + + + + + + - <html>This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME} + + + 4 + 4 + 4 + 4 + + + + + + + + + + + + <html>The following options are <strong>strongly recommended</strong> to be left as default unless there is a particular reason to change them.</html> + + + + + + Allow user-space updates for ${compiler:JALVIEW_APPLICATION_NAME} components + + 3021 + + <html>This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME} <br> components to be automatically downloaded <br> @@ -987,10 +1015,10 @@ On ${installer:osName}, user updates will be installed under <pre>${installer:userDefaultAppdirBase}</pre> unless customised below. </html> - - - - FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS"); + + + + 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 && !allowUserAppdirPath && userAppdirPath.length() == 0 && !installerUpdates ); jb_setDefaults.setEnabled(enableSetDefaults); - - - allowUserDefaultAppdirUpdates - - - - - - - 0 - 32 - 0 - 0 - - - - - - - - - - + + + allowUserDefaultAppdirUpdates + + + - Customise the user-space path - + + + 0 + 32 + 0 + 0 + + + - FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS"); + + + + + + + + Customise the user-space path + + + 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 && !allowUserAppdirPath && userAppdirPath.length() == 0 && !installerUpdates ); jb_setDefaults.setEnabled(enableSetDefaults); - - - allowSetUserAppdirPath - - - - - <html>The base path where individual users' updates + + + allowSetUserAppdirPath + + + + + <html>The base path where individual users' updates <br> will be stored. <br> @@ -1186,15 +1214,17 @@ The following substitutions will be made: <tr><td>%h</td><td>The user's home directory path</td></tr> <tr><td>~</td><td>(at start) The user's home directory path</td></tr> </table> -At least one of the above substitutions should be used. +At least one of the above substitutions should be +<br> +used, e.g. <tt>/tmp/${compiler:UNIX_APPLICATION_FOLDER}/%u/app</tt> <br> The default value on ${installer:osName} is <br> <pre>${installer:userDefaultAppdirBase}</pre> </html> - - - FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS"); + + + 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; - - - - - // get String value of userAppdirPath text field + + + + + // 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); - - - - - - - - userAppdirPath - - FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS"); + + + + + + + + userAppdirPath + + 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 && allowUserAppdirPath); - - - - - - Allow installation updates for ${compiler:JALVIEW_APPLICATION_NAME} components - <html>This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME} + + + + + + Allow installation updates for ${compiler:JALVIEW_APPLICATION_NAME} components + <html>This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME} <br> components to be automatically downloaded <br> @@ -1340,9 +1370,9 @@ Installation updates will be installed into <br> <pre>${installer:sys.contentDir}</pre> </html> - - - FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS"); + + + 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 && !allowUserAppdirPath && userAppdirPath.length() == 0 && !installerUpdates ); jb_setDefaults.setEnabled(enableSetDefaults); - - - allowInstallerAppdirUpdates - - - - - - - FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS"); + + + allowInstallerAppdirUpdates + + + + + + + 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 && !allowUserAppdirPath && userAppdirPath.length() == 0 && !installerUpdates ); jb_setDefaults.setEnabled(enableSetDefaults); - - - Reset advanced options to defaults - - FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS"); + + + Reset advanced options to defaults + + 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 && !allowUserAppdirPath && userAppdirPath.length() == 0 && !installerUpdates ); jb_setDefaults.setEnabled(enableSetDefaults); - - - - - - ${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png - - - No automatic updates will occur when ${compiler:JALVIEW_APPLICATION_NAME} is launched - - !( + + + + + + ${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png + + + No automatic updates will occur when ${compiler:JALVIEW_APPLICATION_NAME} is launched + + !( context.getBooleanVariable("allowUserDefaultAppdirUpdates") || context.getBooleanVariable("allowInstallerAppdirUpdates") ) - - - - - - ${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png - - - The user-space path should contain one of "~" (at the start), "%u" or "%h" - - !( + + + + + + ${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png + + + The user-space path should contain one of "~" (at the start), "%u" or "%h" + + !( context.getBooleanVariable("allowUserDefaultAppdirUpdates") || context.getBooleanVariable("allowInstallerAppdirUpdates") ) - + + +