minor changes Jalview-JS/JAL-3253-applet
authorBobHanson <hansonr@stolaf.edu>
Sat, 13 Jun 2020 14:30:04 +0000 (09:30 -0500)
committerBobHanson <hansonr@stolaf.edu>
Sat, 13 Jun 2020 14:30:04 +0000 (09:30 -0500)
src/jalview/bin/Jalview.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/JvSwingUtils.java
src/jalview/viewmodel/ViewportRanges.java
swingjs/SwingJS-site.zip
swingjs/timestamp
swingjs/ver/3.2.9-j11/SwingJS-site.zip
swingjs/ver/3.2.9-j11/timestamp
swingjs/ver/3.2.9/SwingJS-site.zip
swingjs/ver/3.2.9/timestamp
test/jalview/gui/JvSwingUtilsTest.java

index b6fc7e8..b8f49a2 100755 (executable)
@@ -807,8 +807,7 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi
          * 
          */
         {
-          if (aparser.contains(ArgsParser.NOANNOTATION)
-                  || aparser.contains(ArgsParser.NOANNOTATION2))
+          if (noAnnotation)
           {
             af.getViewport().setShowAnnotation(false);
             if (!af.getViewport().isShowAnnotation())
index 443ae68..c62b2a7 100644 (file)
@@ -872,7 +872,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
      * though I still think this call should be elsewhere.
      */
     ViewportRanges ranges = av.getRanges();
-    setScrollValues(ranges.getStartRes(), ranges.getStartSeq());
+    // setScrollValues(ranges.getStartRes(), ranges.getStartSeq());
     super.paintComponent(g);
   }
 
index fc2ecde..fb487d8 100644 (file)
@@ -73,7 +73,7 @@ public final class JvSwingUtils
   {
     Objects.requireNonNull(ttext,
             "Tootip text to format must not be null!");
-    ttext = ttext.trim();
+    ttext = ttext.trim().replaceAll("<br/>", "<br>");
     boolean maxLengthExceeded = false;
     boolean isHTML = ttext.startsWith("<html>");
     if (isHTML)
index f8decf6..765c9a0 100644 (file)
@@ -234,7 +234,7 @@ public class ViewportRanges extends ViewportProperties
    */
   public void setStartEndSeq(int start, int end)
   {
-    // System.out.println("ViewportRange setStartEndSeq " + start + " " + end);
+    //System.out.println("ViewportRange setStartEndSeq " + start + " " + end);
     int[] oldvalues = updateStartEndSeq(start, end);
     int oldstartseq = oldvalues[0];
     int oldendseq = oldvalues[1];
@@ -813,4 +813,11 @@ public class ViewportRanges extends ViewportProperties
 
     return maxScroll;
   }
+
+  @Override
+  public String toString()
+  {
+    return "[ViewportRange " + startSeq + "-" + endSeq + ", " + startRes
+            + "-" + endRes + "]";
+  }
 }
index f722183..d3beb9b 100644 (file)
Binary files a/swingjs/SwingJS-site.zip and b/swingjs/SwingJS-site.zip differ
index 1d7209a..3ac80a7 100644 (file)
@@ -1 +1 @@
-20200607232230 
+20200609215953 
index 79827d7..f722183 100644 (file)
Binary files a/swingjs/ver/3.2.9-j11/SwingJS-site.zip and b/swingjs/ver/3.2.9-j11/SwingJS-site.zip differ
index f722183..d3beb9b 100644 (file)
Binary files a/swingjs/ver/3.2.9/SwingJS-site.zip and b/swingjs/ver/3.2.9/SwingJS-site.zip differ
index 1d7209a..3ac80a7 100644 (file)
@@ -1 +1 @@
-20200607232230 
+20200609215953 
index d46972a..c33e337 100644 (file)
@@ -108,15 +108,15 @@ public class JvSwingUtilsTest
   public void testWrapTooltip_multilineShortText()
   {
     String tip = "Now is the winter of our discontent<br>Made glorious summer by this sun of York";
-
+    String tip2 = "Now is the winter of our discontent<br/>Made glorious summer by this sun of York";
     // System.out.println(
     // JvSwingUtils.wrapTooltip(false, "<html>" + tip + "</html>"));
     // System.out.println(JvSwingUtils.wrapTooltip(true, tip));
 
     assertEquals("<html>" + tip + "</html>",
-            JvSwingUtils.wrapTooltip(false, "<html>" + tip + "</html>"));
+            JvSwingUtils.wrapTooltip(false, "<html>" + tip2 + "</html>"));
     assertEquals("<html>" + tip + "</html>",
-            JvSwingUtils.wrapTooltip(true, tip));
+            JvSwingUtils.wrapTooltip(true, tip2));
     
 //    was:
 //