JAL-4273 release notes for visible adjuster marks, and patch so they are not rendered...
[jalview.git] / src / jalview / gui / IdCanvas.java
index eb0715a..aaded9e 100755 (executable)
@@ -199,7 +199,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI
 
     gg.translate(0, transY);
 
-    drawIds(gg, av, ss, es, searchResults);
+    drawIds(gg, av, ss, es, searchResults,true);
 
     gg.translate(0, -transY);
 
@@ -256,7 +256,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI
     gg.fillRect(0, 0, getWidth(), imgHeight);
 
     drawIds(gg, av, av.getRanges().getStartSeq(),
-            av.getRanges().getEndSeq(), searchResults);
+            av.getRanges().getEndSeq(), searchResults,true);
 
     gg.dispose();
 
@@ -276,7 +276,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI
    * @param selection
    */
   void drawIds(Graphics2D g, AlignViewport alignViewport,
-          final int startSeq, final int endSeq, List<SequenceI> selection)
+          final int startSeq, final int endSeq, List<SequenceI> selection, boolean forGUI)
   {
     Font font = alignViewport.getFont();
     if (alignViewport.isSeqNameItalics())
@@ -383,11 +383,24 @@ public class IdCanvas extends JPanel implements ViewportListenerI
   void drawIdsWrapped(Graphics2D g, AlignViewport alignViewport,
           int startSeq, int pageHeight)
   {
-    drawIdsWrapped(g, alignViewport, startSeq, pageHeight, -1);
+    drawIdsWrapped(g, alignViewport, startSeq, pageHeight, -1, true);
+  }
+
+  /**
+   * render sequence IDs and annotation labels when wrapped - without GUI junk
+   * @param g
+   * @param av2
+   * @param i
+   * @param totalHeight
+   */
+  public void drawIdsWrappedNoGUI(Graphics2D g, AlignViewport av2, int i,
+          int totalHeight)
+  {
+    drawIdsWrapped(g, av2, totalHeight, totalHeight, i,false);
   }
 
   void drawIdsWrapped(Graphics2D g, AlignViewport alignViewport,
-          int startSeq, int pageHeight, int idWidth)
+          int startSeq, int pageHeight, int idWidth, boolean forGUI)
   {
     int alignmentWidth = alignViewport.getAlignment().getWidth();
     final int alheight = alignViewport.getAlignment().getHeight();
@@ -440,7 +453,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI
         g.translate(0, ypos + (alheight * charHeight));
         if (!manuallyAdjusted())
         {
-          int getAnnotationsIdWidth = labels.drawLabels(g, false, -1, false,
+          int getAnnotationsIdWidth = labels.drawLabels(g, false, -1, false,forGUI,
                   null);
           thisIdWidth = idWidth < 0 ? getAnnotationsIdWidth : idWidth;
           if (thisIdWidth > getWidth)
@@ -451,7 +464,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI
             alignViewport.setIdWidth(thisIdWidth);
           }
         }
-        labels.drawComponent(g, false, thisIdWidth);
+        labels.drawComponent(g, false, thisIdWidth, forGUI);
         g.translate(0, -ypos - (alheight * charHeight));
       }
 
@@ -619,4 +632,5 @@ public class IdCanvas extends JPanel implements ViewportListenerI
   {
     manuallyAdjusted = b;
   }
+
 }