From: gmungoc Date: Wed, 22 Aug 2018 10:31:04 +0000 (+0100) Subject: JAL-3049 JAL-3032 tidy/i18n code, remove redundant tooltip registration X-Git-Tag: Release_2_11_4_0~45^2~18^2~465 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=12d1913c67e7c36587dc2e1de72558be0ecfb564;p=jalview.git JAL-3049 JAL-3032 tidy/i18n code, remove redundant tooltip registration --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 2c4e964..16c897e 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1363,3 +1363,4 @@ label.edit_annotation_name_description = Edit Annotation Name/Description label.alignment = alignment label.pca = PCA label.create_image_of = Create {0} image of {1} +label.click_to_edit = Click to edit, right-click for menu diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 8ef8aa5..2ea7a72 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -1364,3 +1364,4 @@ label.edit_annotation_name_description = Editar el nombre/descripci label.alignment = alineamiento label.pca = ACP label.create_image_of = Crear imagen {0} de {1} +label.click_to_edit = Haga clic para editar, clic en el botón derecho para ver el menú diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 2512a1b..a0bd69e 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -126,7 +126,7 @@ public class FeatureSettings extends JPanel private static final int MIN_HEIGHT = 400; - private final static String BASE_TOOLTIP = "Click to edit, right-click for menu"; + private final static String BASE_TOOLTIP = MessageManager.getString("label.click_to_edit"); final FeatureRenderer fr; @@ -203,8 +203,6 @@ public class FeatureSettings extends JPanel table = new JTable() { - static final String tt = "Click to edit, right-click for menu"; // todo i18n - @Override public String getToolTipText(MouseEvent e) { @@ -233,6 +231,7 @@ public class FeatureSettings extends JPanel default: break; } + return tip; } @@ -252,12 +251,8 @@ public class FeatureSettings extends JPanel } }; table.getTableHeader().setFont(new Font("Verdana", Font.PLAIN, 12)); - table.setFont(new Font("Verdana", Font.PLAIN, 12)); ToolTipManager.sharedInstance().registerComponent(table); - // table.setDefaultRenderer(Color.class, new ColorRenderer()); - // table.setDefaultEditor(Color.class, new ColorEditor(this)); - // table.setDefaultEditor(FeatureColour.class, new ColorEditor(this)); table.setDefaultRenderer(FeatureColour.class, new ColorRenderer());