From 34eab5424aff7f653637d8664893f829f50758eb Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 16 Nov 2004 15:27:06 +0000 Subject: [PATCH] Add only colours that currently work --- src/jalview/schemes/ColourProperties.java | 75 +++++++++++++++++++---------- 1 file changed, 50 insertions(+), 25 deletions(-) diff --git a/src/jalview/schemes/ColourProperties.java b/src/jalview/schemes/ColourProperties.java index ff2c6bc..ae6cd1e 100755 --- a/src/jalview/schemes/ColourProperties.java +++ b/src/jalview/schemes/ColourProperties.java @@ -34,30 +34,10 @@ public class ColourProperties { prefix + "TaylorColourScheme", "Taylor colours")); - colourSchemes.add(new ColourSchemeProperty("PID", - prefix + "PIDColourScheme", - "By PID")); - - colourSchemes.add(new ColourSchemeProperty("BLOSUM62", - prefix + "Blosum62ColourScheme", - "By BLOSUM62 Score")); - - colourSchemes.add(new ColourSchemeProperty("Secondary structure", - prefix + "SecondaryColourScheme", - "By Secondary Structure")); - - colourSchemes.add(new ColourSchemeProperty("User defined", - prefix + "ZappoColourScheme", - "User defined colours")); - colourSchemes.add(new ColourSchemeProperty("Hydrophobic", prefix + "HydrophobicColourScheme", "By Hydrophobicity")); - colourSchemes.add(new ColourSchemeProperty("Conservation", - prefix + "ZappoColourScheme", - null)); - colourSchemes.add(new ColourSchemeProperty("Helix", prefix + "HelixColourScheme", "Helix propensity")); @@ -74,13 +54,33 @@ public class ColourProperties { prefix + "BuriedColourScheme", "Buried index")); - // colourSchemes.add(new ColourSchemeProperty("Features", - // prefix + "FeatureColourScheme", - // null)); + colourSchemes.add(new ColourSchemeProperty("BLOSUM62", + prefix + "Blosum62ColourScheme", + "By BLOSUM62 Score")); + + colourSchemes.add(new ColourSchemeProperty("User defined", + prefix + "ZappoColourScheme", + "User defined colours")); + + /* colourSchemes.add(new ColourSchemeProperty("PID", + prefix + "PIDColourScheme", + "By PID"));*/ + + /* colourSchemes.add(new ColourSchemeProperty("Secondary structure", + prefix + "SecondaryColourScheme", + "By Secondary Structure"));*/ + + /* colourSchemes.add(new ColourSchemeProperty("Conservation", + prefix + "ZappoColourScheme", + null));*/ + + /* colourSchemes.add(new ColourSchemeProperty("Features", + prefix + "FeatureColourScheme", + null)); colourSchemes.add(new ColourSchemeProperty("Clustalx", prefix + "ClustalXColourScheme", - "ClustalX colours")); + "ClustalX colours"));*/ } static int indexOf(String scheme) { @@ -91,7 +91,7 @@ public class ColourProperties { } } - static int indexOfClass(ColourSchemeI scheme) { + public static int indexOfClass(ColourSchemeI scheme) { return colourSchemes.indexOfClass(scheme); } @@ -114,6 +114,31 @@ public class ColourProperties { protected static String getDefaultClassPrefix() { return "jalview.schemes."; } + + public static ColourSchemeI getColourScheme(int i) + { + switch(i) + { + case ColourProperties.HYDROPHOBIC: return new HydrophobicColourScheme(); + + case ColourProperties.TAYLOR: return new TaylorColourScheme(); + case ColourProperties.HELIX: return new HelixColourScheme(); + case ColourProperties.STRAND: return new StrandColourScheme(); + case ColourProperties.TURN: return new TurnColourScheme(); + case ColourProperties.BURIED: return new BuriedColourScheme(); + case ColourProperties.PID: return new PIDColourScheme(); + case ColourProperties.BLOSUM62: return new Blosum62ColourScheme(null); + case ColourProperties.SECONDARY:return new SecondaryColourScheme(); + + case ColourProperties.ZAPPO: + case ColourProperties.USER: + case ColourProperties.CONSERVATION: + case ColourProperties.FEATURES: + case ColourProperties.CLUSTALX: + default: return new ZappoColourScheme(); + } + + } } -- 1.7.10.2