From 7c8bc818866497e3c4d01e22e3e03ac62317d57a Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 25 May 2018 09:13:35 +0100 Subject: [PATCH] JAL-2995 tooltip on fields with double-click to browse for file --- resources/lang/Messages.properties | 1 + resources/lang/Messages_es.properties | 5 +++-- src/jalview/jbgui/GPreferences.java | 13 +++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index a80ac17..4d87b80 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -267,6 +267,7 @@ label.use_rnaview = Use RNAView for secondary structure label.autoadd_secstr = Add secondary structure annotation to alignment label.autoadd_temp = Add Temperature Factor annotation to alignment label.structure_viewer = Default structure viewer +label.double_click_to_browse = Double-click to browse for file label.chimera_path = Path to Chimera program label.chimera_path_tip = Jalview will first try any path entered here, else standard installation locations.
Double-click to browse for file. label.invalid_chimera_path = Chimera path not found or not executable diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 61bf42a..d7c040c 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -1173,6 +1173,7 @@ action.select_by_annotation=Seleccionar/Ocultar Columnas por Anotaci action.export_features=Exportar Características error.invalid_regex=Expresión regular inválida label.autoadd_temp=Añadir anotación factor de temperatura al alineamiento +label.double_click_to_browse = Haga doble clic para buscar fichero label.chimera_path_tip=Jalview intentará primero las rutas introducidas aquí, Y si no las rutas usuales de instalación label.structure_chooser=Selector de Estructuras label.structure_chooser_manual_association=Selector de Estructuras - asociación manual @@ -1219,13 +1220,13 @@ exception.resource_not_be_found=El recurso solicitado no se ha encontrado label.aacon_calculations=cálculos AACon label.pdb_web-service_error=Error de servicio web PDB exception.unable_to_detect_internet_connection=Jalview no puede detectar una conexión a Internet -label.chimera_path=Ruta de acceso a programa Chimera +label.chimera_path=Ruta de acceso a Chimera warn.delete_all=Borrar todas las secuencias cerrará la ventana del alineamiento.
Confirmar o Cancelar. label.select_all=Seleccionar Todos label.alpha_helix=Hélice Alfa label.chimera_help=Ayuda para Chimera label.find_tip=Buscar alineamiento, selección o IDs de secuencia para una subsecuencia (sin huecos) -label.structure_viewer=Visualizador de estructura por defecto +label.structure_viewer=Visualizador por defecto label.embbed_biojson=Incrustar BioJSON al exportar HTML label.transparency_tip=Ajustar la transparencia a "ver a través" los colores de las características. label.choose_annotations=Escoja anotaciones diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index 1ca0802..26e0919 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -524,7 +524,9 @@ public class GPreferences extends JPanel MessageManager.getString("label.default_browser_unix")); defaultBrowser.setFont(LABEL_FONT); defaultBrowser.setText(""); - + final String tooltip = JvSwingUtils.wrapTooltip(true, + MessageManager.getString("label.double_click_to_browse")); + defaultBrowser.setToolTipText(tooltip); defaultBrowser.addMouseListener(new MouseAdapter() { @Override @@ -1206,14 +1208,14 @@ public class GPreferences extends JPanel pathLabel.setFont(new java.awt.Font("SansSerif", 0, 11)); pathLabel.setHorizontalAlignment(SwingConstants.LEFT); pathLabel.setText(MessageManager.getString("label.chimera_path")); - final String tooltip = JvSwingUtils.wrapTooltip(true, - MessageManager.getString("label.chimera_path_tip")); - pathLabel.setToolTipText(tooltip); pathLabel.setBounds(new Rectangle(10, ypos, 140, height)); structureTab.add(pathLabel); chimeraPath.setFont(LABEL_FONT); chimeraPath.setText(""); + final String tooltip = JvSwingUtils.wrapTooltip(true, + MessageManager.getString("label.chimera_path_tip")); + chimeraPath.setToolTipText(tooltip); chimeraPath.setBounds(new Rectangle(160, ypos, 300, height)); chimeraPath.addMouseListener(new MouseAdapter() { @@ -1512,6 +1514,9 @@ public class GPreferences extends JPanel startupCheckbox.setSelected(true); startupFileTextfield.setFont(LABEL_FONT); startupFileTextfield.setBounds(new Rectangle(172, 310, 330, 20)); + final String tooltip = JvSwingUtils.wrapTooltip(true, + MessageManager.getString("label.double_click_to_browse")); + startupFileTextfield.setToolTipText(tooltip); startupFileTextfield.addMouseListener(new MouseAdapter() { @Override -- 1.7.10.2