Hidden representatives moved from sequence to viewport
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 0012ec4..4047ac8 100755 (executable)
@@ -719,7 +719,7 @@ public class AlignmentPanel extends GAlignmentPanel
     {\r
       seq = av.getAlignment().getSequenceAt(i);\r
       if ( (av.getSelectionGroup() != null) &&\r
-          av.getSelectionGroup().getSequences(false).contains(seq))\r
+          av.getSelectionGroup().getSequences(null).contains(seq))\r
       {\r
         currentColor = Color.gray;\r
         currentTextColor = Color.black;\r
@@ -736,8 +736,17 @@ public class AlignmentPanel extends GAlignmentPanel
 \r
       pg.setColor(currentTextColor);\r
 \r
+      int xPos = 0;\r
+      if (av.rightAlignIds)\r
+      {\r
+        fm = pg.getFontMetrics();\r
+        xPos = idWidth - fm.stringWidth(\r
+            seq.getDisplayId(av.getShowJVSuffix())\r
+            ) - 4;\r
+      }\r
+\r
       pg.drawString(seq.getDisplayId( av.getShowJVSuffix()),\r
-                    0,\r
+                    xPos,\r
                     ( ( (i - startSeq) * av.charHeight) + av.getCharHeight()) -\r
                     (av.getCharHeight() / 5));\r
     }\r
@@ -828,8 +837,13 @@ public class AlignmentPanel extends GAlignmentPanel
       {\r
         SequenceI s = av.alignment.getSequenceAt(i);\r
         String string = s.getDisplayId( av.getShowJVSuffix());\r
-\r
-        pg.drawString(string, 0,\r
+        int xPos = 0;\r
+        if (av.rightAlignIds)\r
+        {\r
+          FontMetrics fm = getFontMetrics(italic);\r
+          xPos = idWidth - fm.stringWidth( string ) - 4;\r
+        }\r
+        pg.drawString(string, xPos,\r
                       ( (i * av.charHeight) + ypos + av.charHeight) -\r
                       (av.charHeight / 5));\r
       }\r