int recty2;\r
float scalefactor = 1;\r
AlignViewport av;\r
+ boolean showLabels = false;\r
+ Color bgColour = Color.black;\r
\r
// Controller controller;\r
public RotatableCanvas(AlignViewport av)\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
*/\r
public void paintComponent(Graphics g)\r
{\r
+\r
if(points==null)\r
{\r
g.setFont(new Font("Verdana", Font.PLAIN, 18));\r
ig = img.getGraphics();\r
}\r
\r
- drawBackground(ig, Color.black);\r
+\r
+ drawBackground(ig, bgColour);\r
drawScene(ig);\r
\r
if (drawAxes == true)\r
*\r
* @param g DOCUMENT ME!\r
*/\r
- public void drawAxes(Graphics g)\r
+ public void drawAxes(Graphics g1)\r
{\r
+ Graphics2D g = (Graphics2D) g1;\r
+\r
+ g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r
+ RenderingHints.VALUE_ANTIALIAS_ON);\r
+\r
g.setColor(Color.yellow);\r
\r
for (int i = 0; i < 3; i++)\r
*\r
* @param g DOCUMENT ME!\r
*/\r
- public void drawScene(Graphics g)\r
+ public void drawScene(Graphics g1)\r
{\r
- boolean darker = false;\r
+\r
+ Graphics2D g = (Graphics2D) g1;\r
+\r
+ g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r
+ RenderingHints.VALUE_ANTIALIAS_ON);\r
+\r
\r
int halfwidth = getWidth() / 2;\r
int halfheight = getHeight() / 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