JAL-4260 right align the annotation labels regardless of width in wrapped mode.
[jalview.git] / src / jalview / gui / AnnotationLabels.java
index a0d70b4..08a25ba 100755 (executable)
@@ -1246,7 +1246,7 @@ public class AnnotationLabels extends JPanel
     else
     {
       int newAnnotationIdWidth = drawLabels(g, clip, width, false, forGUI, null, false);
-      width = Math.max(newAnnotationIdWidth, givenWidth);
+      width = newAnnotationIdWidth<givenWidth ? givenWidth: Math.min(newAnnotationIdWidth, givenWidth);
     }
     drawLabels(g, clip, width, true, forGUI, null, false);
   }