- /*
- * enable / disable colour schemes
- * - the old, simple way (based on the nucleotide flag), or
- * - the new, generic way (interrogate the colour scheme)
- */
- AlignmentI al = getViewport().getAlignment();
- clustalColour.setEnabled(!nucleotide);
- zappoColour.setEnabled(!nucleotide);
- taylorColour.setEnabled(!nucleotide);
- hydrophobicityColour.setEnabled(!nucleotide);
- helixColour.setEnabled(!nucleotide);
- strandColour.setEnabled(!nucleotide);
- turnColour.setEnabled(!nucleotide);
- // buriedColour.setEnabled(!nucleotide);
- // TODO make isApplicableTo static in ColourSchemeI in Java 8
- buriedColour.setEnabled(new BuriedColourScheme().isApplicableTo(al));
- rnahelicesColour.setEnabled(nucleotide);
- nucleotideColour.setEnabled(nucleotide);
- // purinePyrimidineColour.setEnabled(nucleotide);
- purinePyrimidineColour.setEnabled(new PurinePyrimidineColourScheme()
- .isApplicableTo(al));
- tcoffeeColour
- .setEnabled(new TCoffeeColourScheme(al).isApplicableTo(al));
- RNAInteractionColour.setEnabled(nucleotide);
- showComplementMenuItem.setText(nucleotide ? MessageManager
- .getString("label.protein") : MessageManager
- .getString("label.nucleotide"));
-
- String selectedColourScheme = Cache.getDefault(
- nucleotide ? Preferences.DEFAULT_COLOUR_NUC
- : Preferences.DEFAULT_COLOUR_PROT,
- ResidueColourScheme.NONE);
- setColourSelected(selectedColourScheme);