From 5e021a615132ce9f8dd7e47558b7e2bf8b094082 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 21 Jan 2005 18:33:37 +0000 Subject: [PATCH] New colourScheme --- src/jalview/schemes/NucleotideColourScheme.java | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 src/jalview/schemes/NucleotideColourScheme.java 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; + + } + +} -- 1.7.10.2