JAL-1580 Chimera path tooltip, removed focusListener
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 18 Nov 2014 11:51:46 +0000 (11:51 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 18 Nov 2014 11:51:46 +0000 (11:51 +0000)
resources/lang/Messages.properties
src/jalview/jbgui/GPreferences.java

index 952f902..5d3667b 100644 (file)
@@ -249,7 +249,7 @@ 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.chimera_path = Path to Chimera program
-label.chimera_path_tip = Jalview will try standard locations, plus any path entered here.
+label.chimera_path_tip = Jalview will first try any path entered here, else standard installation locations.<br>Double-click to browse for file.
 label.invalid_chimera_path = Chimera path not found or not executable
 label.min_colour = Minimum Colour
 label.max_colour = Maximum Colour
index 9d691ca..5569c24 100755 (executable)
@@ -37,7 +37,6 @@ import java.awt.Insets;
 import java.awt.Rectangle;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.awt.event.FocusAdapter;
 import java.awt.event.FocusEvent;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseAdapter;
@@ -790,8 +789,9 @@ 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"));
-    pathLabel.setToolTipText(MessageManager
-            .getString("label.chimera_path_tip"));
+    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);
 
@@ -815,15 +815,6 @@ public class GPreferences extends JPanel
     });
     structureTab.add(chimeraPath);
 
-    structureTab.addFocusListener(new FocusAdapter()
-    {
-      @Override
-      public void focusLost(FocusEvent e)
-      {
-        validateStructure(e);
-      }
-
-    });
     return structureTab;
   }