From: amwaterhouse Date: Fri, 21 Jan 2005 18:33:37 +0000 (+0000) Subject: New colourScheme X-Git-Tag: Release_2_0~735 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5e021a615132ce9f8dd7e47558b7e2bf8b094082;p=jalview.git New colourScheme --- diff --git a/src/jalview/schemes/NucleotideColourScheme.java b/src/jalview/schemes/NucleotideColourScheme.java new file mode 100755 index 0000000..caa6998 --- /dev/null +++ b/src/jalview/schemes/NucleotideColourScheme.java @@ -0,0 +1,37 @@ +package jalview.schemes; + +import java.awt.*; +import java.util.*; + + +public class NucleotideColourScheme extends ResidueColourScheme +{ + public NucleotideColourScheme() { + super(ResidueProperties.nucleotide,0); + } + + + public Color findColour(String n) + { + System.out.println("called"); + return colors[((Integer)(ResidueProperties.nucleotideHash.get(n))).intValue()]; + } + + + public Color findColour(String n, int j, Vector aa) { + + if (threshold == 0 || aboveThreshold(aa, n, j)) + try + { + return colors[ ( (Integer) (ResidueProperties.nucleotideHash.get(n))).intValue()]; + } + catch (Exception ex) + { + return Color.white; + } + else + return Color.white; + + } + +}