AlignSeq takes printstream as arg
[jalview.git] / src / jalview / appletgui / RotatableCanvas.java
index 9fa7491..b27ab8a 100755 (executable)
@@ -80,17 +80,23 @@ public class RotatableCanvas
   float scalefactor = 1;\r
 \r
   AlignViewport av;\r
+  boolean showLabels = false;\r
 \r
   public RotatableCanvas(AlignViewport av)\r
   {\r
     this.av = av;\r
   }\r
 \r
+  public void showLabels(boolean b)\r
+  {\r
+    showLabels = b;\r
+    repaint();\r
+  }\r
+\r
   public void setPoints(Vector points, int npoint)\r
   {\r
     this.points = points;\r
     this.npoint = npoint;\r
-    this.av = av;\r
     PaintRefresher.Register(this, av.alignment);\r
 \r
     prefsize = getPreferredSize();\r
@@ -287,6 +293,11 @@ public class RotatableCanvas
 \r
   public void paint(Graphics g)\r
   {\r
+    if (!jalview.bin.JalviewLite.AWT1)\r
+    {\r
+      MyGraphics.AntiAlias(g);\r
+    }\r
+\r
     if (points == null)\r
     {\r
       g.setFont(new Font("Verdana", Font.PLAIN, 18));\r
@@ -341,7 +352,7 @@ public class RotatableCanvas
 \r
   public void drawScene(Graphics g)\r
   {\r
-    boolean darker = false;\r
+    //boolean darker = false;\r
 \r
     int halfwidth = getSize().width / 2;\r
     int halfheight = getSize().height / 2;\r
@@ -376,7 +387,14 @@ public class RotatableCanvas
       }\r
 \r
       g.fillRect(x - 3, y - 3, 6, 6);\r
-      g.setColor(Color.red);\r
+      if (showLabels)\r
+      {\r
+        g.setColor(Color.red);\r
+        g.drawString( ( (SequencePoint) points.elementAt(i)).sequence.\r
+                     getName(),\r
+                     x - 3, y - 4);\r
+      }\r
+\r
     }\r
 //    //Now the rectangle\r
 //    if (rectx2 != -1 && recty2 != -1) {\r
@@ -550,7 +568,7 @@ public class RotatableCanvas
 \r
   public void rectSelect(int x1, int y1, int x2, int y2)\r
   {\r
-    boolean changedSel = false;\r
+    //boolean changedSel = false;\r
     for (int i = 0; i < npoint; i++)\r
     {\r
       SequencePoint sp = (SequencePoint) points.elementAt(i);\r