JAL-2047 JAL-1919 fixed empty tooltip text when a cell in PDB Search and Structure...
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 6 Apr 2016 14:02:54 +0000 (15:02 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 6 Apr 2016 14:02:54 +0000 (15:02 +0100)
src/jalview/ext/jmol/JmolParser.java
src/jalview/ws/uimodel/PDBRestResponse.java

index 3280471..0cbd620 100644 (file)
@@ -277,9 +277,15 @@ public class JmolParser extends StructureFile implements JmolStatusListener
     {
       if (secstr[p] >= 'A' && secstr[p] <= 'z')
       {
+        try
+        {
         asecstr[p] = new Annotation(String.valueOf(secstr[p]), null,
                 secstrcode[p], Float.NaN);
         ssFound = true;
+        } catch (Exception e)
+        {
+          // e.printStackTrace();
+        }
       }
     }
 
index 2a38b39..3dc3563 100644 (file)
@@ -198,7 +198,8 @@ public class PDBRestResponse
               summaryRowData[colCounter++] = 0.0;
             }
           }else{
-            summaryRowData[colCounter++] = fieldData;
+            summaryRowData[colCounter++] = (fieldData == null || fieldData
+                    .isEmpty()) ? null : fieldData;
           }
         }
       }
@@ -270,6 +271,8 @@ public class PDBRestResponse
   {
     for (PDBDocField wantedField : wantedFields)
     {
+      try
+      {
       if (wantedField.equals(PDBDocField.PDB_ID))
       {
         tbl_summary.getColumn(wantedField.getName()).setMinWidth(40);
@@ -294,6 +297,10 @@ public class PDBRestResponse
         tbl_summary.getColumn(wantedField.getName()).setMaxWidth(400);
         tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(95);
       }
+      } catch (Exception e)
+      {
+        e.printStackTrace();
+      }
     }
   }
 }