From ec78a9a04812a91363af28ecaa08ec055133bf87 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 27 Apr 2007 09:54:41 +0000 Subject: [PATCH] Set black if colour null --- src/jalview/appletgui/AnnotationPanel.java | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 5242752..fbc98be 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -653,7 +653,11 @@ public class AnnotationPanel fm.charWidth(row.annotations[column]. displayCharacter.charAt( 0))) / 2; - g.setColor(row.annotations[column].colour); + + if (row.annotations[column].colour == null) + g.setColor(Color.black); + else + g.setColor(row.annotations[column].colour); if (column == 0 || row.graph > 0) { @@ -971,7 +975,11 @@ public class AnnotationPanel continue; } - g.setColor(aa.annotations[column].colour); + if (aa.annotations[column].colour == null) + g.setColor(Color.black); + else + g.setColor(aa.annotations[column].colour); + y1 = y - (int) ( ( (aa.annotations[column - 1].value - min) / range) * graphHeight); y2 = y - @@ -1038,7 +1046,11 @@ public class AnnotationPanel continue; } - g.setColor(aa.annotations[column].colour); + if (aa.annotations[column].colour == null) + g.setColor(Color.black); + else + g.setColor(aa.annotations[column].colour); + y1 = y - (int) ( ( (aa.annotations[column].value - min) / (range)) * aa.graphHeight); @@ -1074,7 +1086,10 @@ public class AnnotationPanel for (int j = sRes; j < eRes; j++) { - g.setColor(aa.annotations[j].colour); + if (aa.annotations[j].colour == null) + g.setColor(Color.black); + else + g.setColor(aa.annotations[j].colour); height = (int) ( (aa.annotations[j].value / aa.graphMax) * GRAPH_HEIGHT); if (height > y) -- 1.7.10.2