- /**
- * DOCUMENT ME!
- *
- * @param seqs
- * DOCUMENT ME!
- * @param width
- * DOCUMENT ME!
- * @param index
- * DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
- public static ColourSchemeI getColour(java.util.Vector seqs, int width,
- int index)
- {
- ColourSchemeI cs = null;
-
- switch (index)
- {
- case CLUSTAL:
- cs = new ClustalxColourScheme(seqs, width);
-
- break;
-
- case BLOSUM:
- cs = new Blosum62ColourScheme();
-
- break;
-
- case PID:
- cs = new PIDColourScheme();
-
- break;
-
- case ZAPPO:
- cs = new ZappoColourScheme();
-
- break;
-
- case TAYLOR:
- cs = new TaylorColourScheme();
- break;
-
- case HYDROPHOBIC:
- cs = new HydrophobicColourScheme();
-
- break;
-
- case HELIX:
- cs = new HelixColourScheme();
-
- break;
-
- case STRAND:
- cs = new StrandColourScheme();
-
- break;
-
- case TURN:
- cs = new TurnColourScheme();
-
- break;
-
- case BURIED:
- cs = new BuriedColourScheme();
-
- break;
-
- case NUCLEOTIDE:
- cs = new NucleotideColourScheme();
-
- break;
-
- case USER_DEFINED:
- Color[] col = new Color[24];
- for (int i = 0; i < 24; i++)
- {
- col[i] = Color.white;
- }
- cs = new UserColourScheme(col);
- break;
-
- default:
- break;
- }
-
- return cs;
- }
-
- public static Color getAWTColorFromName(String name)
- {
- Color col = null;
- name = name.toLowerCase();
- if (name.equals("black"))
- {
- col = Color.black;
- }
- else if (name.equals("blue"))
- {
- col = Color.blue;
- }
- else if (name.equals("cyan"))
- {
- col = Color.cyan;
- }
- else if (name.equals("darkGray"))
- {
- col = Color.darkGray;
- }
- else if (name.equals("gray"))
- {
- col = Color.gray;
- }
- else if (name.equals("green"))
- {
- col = Color.green;
- }
- else if (name.equals("lightGray"))
- {
- col = Color.lightGray;
- }
- else if (name.equals("magenta"))
- {
- col = Color.magenta;
- }
- else if (name.equals("orange"))
- {
- col = Color.orange;
- }
- else if (name.equals("pink"))
- {
- col = Color.pink;
- }
- else if (name.equals("red"))
- {
- col = Color.red;
- }
- else if (name.equals("white"))
- {
- col = Color.white;
- }
- else if (name.equals("yellow"))
- {
- col = Color.yellow;
- }
-
- return col;
- }