+++ /dev/null
-package jalview.schemes;\r
-\r
-import java.util.*;\r
-\r
-public class ColourProperties {\r
-\r
- public static final int ZAPPO = 0;\r
- public static final int TAYLOR = 1;\r
- public static final int PID = 2;\r
- public static final int BLOSUM62 = 3;\r
- public static final int SECONDARY = 4;\r
- public static final int USER = 5;\r
- public static final int HYDROPHOBIC = 6;\r
- public static final int CONSERVATION = 7;\r
- public static final int HELIX = 8;\r
- public static final int STRAND = 9;\r
- public static final int TURN = 10;\r
- public static final int BURIED = 11;\r
- public static final int FEATURES = 12;\r
- public static final int CLUSTALX = 13;\r
-\r
- static ColourSchemePropertyVector colourSchemes = new ColourSchemePropertyVector();\r
-\r
- static {\r
- String prefix = getDefaultClassPrefix();\r
-\r
- // MC 27/03/02 These should be read in from a file\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Zappo",\r
- prefix + "ZappoColourScheme",\r
- "Zappo colours"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Taylor",\r
- prefix + "TaylorColourScheme",\r
- "Taylor colours"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Hydrophobic",\r
- prefix + "HydrophobicColourScheme",\r
- "By Hydrophobicity"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Helix",\r
- prefix + "HelixColourScheme",\r
- "Helix propensity"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Strand",\r
- prefix + "StrandColourScheme",\r
- "Strand propensity"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Turn",\r
- prefix + "TurnColourScheme",\r
- "Turn propensity"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Buried",\r
- prefix + "BuriedColourScheme",\r
- "Buried index"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("BLOSUM62",\r
- prefix + "Blosum62ColourScheme",\r
- "By BLOSUM62 Score"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("User defined",\r
- prefix + "ZappoColourScheme",\r
- "User defined colours"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("PID",\r
- prefix + "PIDColourScheme",\r
- "By PID"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Secondary structure",\r
- prefix + "SecondaryColourScheme",\r
- "By Secondary Structure"));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Conservation",\r
- prefix + "ZappoColourScheme",\r
- null));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Features",\r
- prefix + "FeatureColourScheme",\r
- null));\r
-\r
- colourSchemes.add(new ColourSchemeProperty("Clustalx",\r
- prefix + "ClustalXColourScheme",\r
- "ClustalX colours"));\r
- }\r
-\r
- static int indexOf(String scheme) {\r
- if (colourSchemes.contains(scheme)) {\r
- return colourSchemes.indexOf(scheme);\r
- } else {\r
- return -1;\r
- }\r
- }\r
-\r
- public static int indexOfClass(ColourSchemeI scheme) {\r
- return colourSchemes.indexOfClass(scheme);\r
- }\r
-\r
- public static String getClassName(int index) {\r
- return colourSchemes.getClassName(index);\r
- }\r
-\r
- public static String getMenuString(int index) {\r
- return colourSchemes.getMenuString(index);\r
- }\r
-\r
- static boolean contains(String scheme) {\r
- return colourSchemes.contains(scheme);\r
- }\r
-\r
- public static Vector getColourSchemeNames() {\r
- return colourSchemes.getColourSchemeNames();\r
- }\r
-\r
- protected static String getDefaultClassPrefix() {\r
- return "jalview.schemes.";\r
- }\r
-\r
- public static ColourSchemeI getColourScheme(int i)\r
- {\r
- switch(i)\r
- {\r
- case ColourProperties.HYDROPHOBIC: return new HydrophobicColourScheme();\r
-\r
- case ColourProperties.TAYLOR: return new TaylorColourScheme();\r
- case ColourProperties.HELIX: return new HelixColourScheme();\r
- case ColourProperties.STRAND: return new StrandColourScheme();\r
- case ColourProperties.TURN: return new TurnColourScheme();\r
- case ColourProperties.BURIED: return new BuriedColourScheme();\r
- case ColourProperties.PID: return new PIDColourScheme();\r
- case ColourProperties.BLOSUM62: return new Blosum62ColourScheme(null);\r
-\r
- case ColourProperties.ZAPPO:\r
- case ColourProperties.USER:\r
- case ColourProperties.CONSERVATION:\r
- case ColourProperties.FEATURES:\r
- case ColourProperties.CLUSTALX:\r
- default: return new ZappoColourScheme();\r
- }\r
-\r
- }\r
-}\r
-\r
-\r
-\r