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
\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
\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
}\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
\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