String enterLabel(String text, String label)\r
{\r
EditNameDialog dialog = new EditNameDialog(text,null,label,null,\r
- ap.alignFrame,"Enter Label", 400,200);\r
+ ap.alignFrame,"Enter Label", 400,200, true);\r
\r
if(dialog.accept)\r
return dialog.getName();\r
{\r
// setHeight of panels\r
AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
-\r
int height = 0;\r
+\r
if (aa != null)\r
{\r
for (int i = 0; i < aa.length; i++)\r
{\r
aa[i].height += av.charHeight;\r
}\r
+\r
if (aa[i].hasIcons)\r
{\r
aa[i].height += 16;\r
\r
if (aa[i].graph > 0)\r
{\r
- aa[i].height += GRAPH_HEIGHT;\r
+ aa[i].height += aa[i].graphHeight;\r
}\r
\r
if (aa[i].height == 0)\r
{\r
aa[i].height = 20;\r
}\r
+\r
height += aa[i].height;\r
}\r
}\r
fm.charWidth(row.annotations[column].\r
displayCharacter.charAt(\r
0))) / 2;\r
- g.setColor(row.annotations[column].colour);\r
+\r
+ if (row.annotations[column].colour == null)\r
+ g.setColor(Color.black);\r
+ else\r
+ g.setColor(row.annotations[column].colour);\r
\r
if (column == 0 || row.graph > 0)\r
{\r
continue;\r
}\r
\r
- g.setColor(aa.annotations[column].colour);\r
+ if (aa.annotations[column].colour == null)\r
+ g.setColor(Color.black);\r
+ else\r
+ g.setColor(aa.annotations[column].colour);\r
+\r
y1 = y -\r
(int) ( ( (aa.annotations[column - 1].value - min) / range) * graphHeight);\r
y2 = y -\r
continue;\r
}\r
\r
- g.setColor(aa.annotations[column].colour);\r
+ if (aa.annotations[column].colour == null)\r
+ g.setColor(Color.black);\r
+ else\r
+ g.setColor(aa.annotations[column].colour);\r
+\r
y1 = y -\r
(int) ( ( (aa.annotations[column].value - min) / (range)) * aa.graphHeight);\r
\r
public void drawGraph(Graphics g, AlignmentAnnotation aa, int width, int y,\r
int sRes, int eRes)\r
{\r
+ eRes = Math.min(eRes, aa.annotations.length);\r
g.setColor(Color.white);\r
g.fillRect(0, 0, width, y);\r
g.setColor(new Color(0, 0, 180));\r
\r
for (int j = sRes; j < eRes; j++)\r
{\r
- g.setColor(aa.annotations[j].colour);\r
+ if (aa.annotations[j].colour == null)\r
+ g.setColor(Color.black);\r
+ else\r
+ g.setColor(aa.annotations[j].colour);\r
\r
height = (int) ( (aa.annotations[j].value / aa.graphMax) * GRAPH_HEIGHT);\r
if (height > y)\r