public Color findSequenceColour(SequenceI seq, int i)\r
{\r
allGroups = av.alignment.findAllGroups(seq);\r
- drawBoxes(seq, i,i, 0, 0, 1,1);\r
+ drawBoxes(seq, i,i, 0);\r
return resBoxColour;\r
}\r
\r
public void drawSequence(Graphics g, SequenceI seq, SequenceGroup[] sg,\r
- int start, int end, int x1, int y1, int width,\r
- int height)\r
+ int start, int end, int y1)\r
{\r
allGroups = sg;\r
\r
graphics = g;\r
\r
- drawBoxes(seq, start, end, x1, y1, (int) width, height);\r
+ drawBoxes(seq, start, end, y1);\r
\r
fm = g.getFontMetrics();\r
- drawText(seq, start, end, x1, y1, (int) width, height);\r
+ drawText(seq, start, end, y1);\r
\r
}\r
\r
- public void drawBoxes(SequenceI seq, int start, int end, int x1, int y1,\r
- int width, int height)\r
+ public void drawBoxes(SequenceI seq, int start, int end, int y1)\r
{\r
int i = start;\r
int length = seq.getLength();\r
\r
int curStart = -1;\r
- int curWidth = width;\r
+ int curWidth = av.charWidth;\r
\r
Color tempColour = null;\r
while (i <= end)\r
{\r
if (tempColour != null)\r
{\r
- graphics.fillRect(x1 + width * (curStart - start), y1, curWidth,\r
- height);\r
+ graphics.fillRect(av.charWidth * (curStart - start), y1, curWidth,\r
+ av.charHeight);\r
}\r
graphics.setColor(resBoxColour);\r
\r
curStart = i;\r
- curWidth = width;\r
+ curWidth = av.charWidth;\r
tempColour = resBoxColour;\r
\r
}\r
else\r
{\r
- curWidth += width;\r
+ curWidth += av.charWidth;\r
}\r
\r
i++;\r
}\r
\r
- graphics.fillRect(x1 + width * (curStart - start), y1, curWidth, height);\r
+ graphics.fillRect(av.charWidth * (curStart - start), y1, curWidth, av.charHeight);\r
}\r
\r
- public void drawText(SequenceI seq, int start, int end, int x1, int y1,\r
- int width, int height)\r
+ public void drawText(SequenceI seq, int start, int end, int y1)\r
{\r
\r
- y1 += height - height / 5; // height/5 replaces pady\r
+ y1 += av.charHeight - av.charHeight / 5; // height/5 replaces pady\r
\r
int charOffset = 0;\r
\r
}\r
}\r
\r
- charOffset = (width - fm.charWidth(s)) / 2;\r
+ charOffset = (av.charWidth - fm.charWidth(s)) / 2;\r
graphics.drawString(String.valueOf(s),\r
- charOffset + x1 + width * (i - start),\r
+ charOffset + av.charWidth * (i - start),\r
y1 );\r
}\r
\r