From: amwaterhouse Date: Fri, 27 Apr 2007 09:54:41 +0000 (+0000) Subject: Set black if colour null X-Git-Tag: Release_2_3~143 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ec78a9a04812a91363af28ecaa08ec055133bf87;p=jalview.git Set black if colour null --- 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)