JAL-1370 correct i18n message for reference sequence entry in popup menu
[jalview.git] / src / jalview / jbgui / GPDBSearchPanel.java
index 08a620a..6f6f1aa 100644 (file)
@@ -93,8 +93,13 @@ public abstract class GPDBSearchPanel extends JPanel
       {
         e.printStackTrace();
       }
-      toolTipText = (toolTipText == null ? null : JvSwingUtils.wrapTooltip(
-              true, toolTipText));
+      toolTipText = (toolTipText == null ? null
+              : (toolTipText.length() > 500 ? JvSwingUtils.wrapTooltip(
+                      true, toolTipText.subSequence(0, 500)
+ + "...")
+                      : JvSwingUtils.wrapTooltip(true,
+                      toolTipText)));
+
       return toolTipText;
     }
   };
@@ -107,8 +112,12 @@ tbl_summary);
   protected ImageIcon warningImage = new ImageIcon(getClass().getResource(
           "/images/warning.gif"));
 
+  protected ImageIcon loadingImage = new ImageIcon(getClass().getResource(
+          "/images/loading.gif"));
   protected JLabel lbl_warning = new JLabel(warningImage);
 
+  protected JLabel lbl_loading = new JLabel(loadingImage);
+
   private JTabbedPane tabbedPane = new JTabbedPane();
 
   private PDBDocFieldPreferences pdbDocFieldPrefs = new PDBDocFieldPreferences(
@@ -146,6 +155,8 @@ tbl_summary);
   {
     lbl_warning.setVisible(false);
     lbl_warning.setFont(new java.awt.Font("Verdana", 0, 12));
+    lbl_loading.setVisible(false);
+    lbl_loading.setFont(new java.awt.Font("Verdana", 0, 12));
 
     tbl_summary.setAutoCreateRowSorter(true);
     tbl_summary.getTableHeader().setReorderingAllowed(false);
@@ -283,14 +294,18 @@ tbl_summary);
         JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent
                 .getSource();
         int index = sourceTabbedPane.getSelectedIndex();
-        btn_ok.setEnabled(false);
         if (sourceTabbedPane.getTitleAt(index).equals(configureCols))
         {
+          btn_back.setEnabled(false);
+          btn_cancel.setEnabled(false);
+          btn_ok.setEnabled(false);
           previousWantedFields = PDBDocFieldPreferences
                   .getSearchSummaryFields().toArray(new PDBDocField[0]);
         }
         if (sourceTabbedPane.getTitleAt(index).equals(searchTabTitle))
         {
+          btn_back.setEnabled(true);
+          btn_cancel.setEnabled(true);
           if (wantedFieldsUpdated())
           {
             txt_search_ActionPerformed();
@@ -314,6 +329,7 @@ tbl_summary);
     pnl_results.add(tabbedPane);
     pnl_inputs.add(cmb_searchTarget);
     pnl_inputs.add(txt_search);
+    pnl_inputs.add(lbl_loading);
     pnl_inputs.add(lbl_warning);
 
     this.setLayout(mainLayout);