// ------------------
final static String display_options[][] = {
{ "Phylogram", "display", "?" }, { "Node Name", "display", "yes" }, { "Taxonomy Code", "display", "yes" },
- { "Seq Annotations", "nodisplay", "no" }, { "Confidence Values", "display", "?" },
+ { "Seq Annotations", "display", "no" }, { "Confidence Values", "display", "?" },
{ "Node Events", "display", "?" }, { "Colorize by Taxonomy", "display", "no" },
+ { "Colorize by Sequence", "display", "no" },
{ "Visual Styles/Branch Colors", "display", "no" }, { "Branch Widths", "display", "no" },
- { "Show Custom Nodes", "display", "yes" }, { "Protein Domains", "nodisplay", "no" },
- { "Binary Characters", "nodisplay", "no" }, { "Binary Char Counts", "nodisplay", "no" },
- { "Seq Name", "display", "yes" }, { "Seq Accession", "display", "no" },
- { "Show Internal Data", "display", "yes" }, { "Dyna Hide", "display", "yes" },
- { "Taxonomy Scientific", "display", "yes" }, { "Taxonomy Common", "display", "no" },
- { "Colorize by Annotation", "nodisplay", "no" }, { "Seq Symbol", "display", "yes" },
- { "Rollover", "display", "yes" }, { "Relation Confidence", "nodisplay", "no" },
- { "Vector Data", "nodisplay", "no" }, { "Taxonomy Images", "display", "no" },
- { "Properties", "nodisplay", "no" }, { "Gene Name", "display", "yes" } };
+ { "Protein Domains", "display", "no" }, { "Binary Characters", "nodisplay", "no" },
+ { "Binary Char Counts", "nodisplay", "no" }, { "Seq Name", "display", "yes" },
+ { "Seq Accession", "display", "no" }, { "Show Internal Data", "display", "yes" },
+ { "Dyna Hide", "display", "yes" }, { "Taxonomy Scientific", "display", "yes" },
+ { "Taxonomy Common", "display", "no" }, { "Colorize by Annotation", "display", "no" },
+ { "Seq Symbol", "display", "yes" }, { "Rollover", "display", "yes" },
+ { "Relation Confidence", "nodisplay", "no" }, { "Vector Data", "nodisplay", "no" },
+ { "Taxonomy Images", "display", "no" }, { "Properties", "display", "no" },
+ { "Gene Name", "display", "yes" } };
final static int display_as_phylogram = 0;
final static int show_node_names = 1;
final static int show_tax_code = 2;
final static int write_confidence_values = 4;
final static int write_events = 5;
final static int color_according_to_species = 6;
- final static int use_style = 7;
- final static int width_branches = 8;
- final static int show_custom_node_shapes = 9;
+ final static int color_according_to_sequence = 7;
+ final static int use_style = 8;
+ final static int width_branches = 9;
final static int show_domain_architectures = 10;
final static int show_binary_characters = 11;
final static int show_binary_character_counts = 12;
final static int show_properties = 25;
final static int show_gene_names = 26;
static final String VALIDATE_AGAINST_PHYLOXML_XSD_SCHEMA = "validate_against_phyloxml_xsd_schema";
- // ----------------
- // Function colors
- // ----------------
+ private static Hashtable<String, Color> _sequence_colors;
+
+
private static Hashtable<String, Color> _annotation_colors;
- // ----------------
- // Domain colors
- // ----------------
private static Hashtable<String, Color> _domain_colors;
- // ----------------
- // Species colors
- // ----------------
private static Hashtable<String, Color> _species_colors;
private static String DEFAULT_FONT_FAMILY = "";
private static final int DEPRECATED = -2;
getDisplayColors().put( key, color );
}
+ public void setAddTaxonomyImagesCB( final boolean b ) {
+ display_options[ show_taxonomy_images ][ 1 ] = b ? "yes" : "no";
+ }
+
public void setAbbreviateScientificTaxonNames( final boolean abbreviate_scientific_names ) {
_abbreviate_scientific_names = abbreviate_scientific_names;
}
display_options[ display_as_phylogram ][ 2 ] = b ? "yes" : "no";
}
+ public void setUseStyle( final boolean b ) {
+ display_options[ use_style ][ 2 ] = b ? "yes" : "no";
+ }
+
public void setDisplayColors( final SortedMap<String, Color> display_colors ) {
_display_colors = display_colors;
}
display_options[ show_seq_names ][ 2 ] = b ? "yes" : "no";
}
+ public void setDisplayGeneNames( final boolean b ) {
+ display_options[ show_gene_names ][ 2 ] = b ? "yes" : "no";
+ }
+
public void setDisplaySequenceRelations( final boolean display_sequence_relations ) {
_display_sequence_relations = display_sequence_relations;
}
public void setShowScale( final boolean show_scale ) {
_show_scale = show_scale;
}
-
- public void setTaxonomyColorize( final boolean b ) {
- display_options[ color_according_to_species ][ 2 ] = b ? "yes" : "no";
- }
-
- public void setUseBranchesWidths( final boolean b ) {
- display_options[ width_branches ][ 2 ] = b ? "yes" : "no";
- }
-
+
boolean displaySequenceRelations() {
return _display_sequence_relations;
}
}
return _species_colors;
}
+
+ Hashtable<String, Color> getSequenceColors() {
+ if ( _sequence_colors == null ) {
+ _sequence_colors = new Hashtable<String, Color>();
+ }
+ return _sequence_colors;
+ }
final TAXONOMY_EXTRACTION getTaxonomyExtraction() {
return _taxonomy_extraction;
else if ( key.equals( "color_according_to_species" ) ) {
key_index = Configuration.color_according_to_species;
}
+ else if ( key.equals( "color_according_to_sequence" ) ) {
+ key_index = Configuration.color_according_to_sequence;
+ }
else if ( key.equals( "show_node_names" ) ) {
key_index = Configuration.show_node_names;
}
else if ( key.equals( "show_relation_confidence" ) ) {
key_index = Configuration.show_relation_confidence;
}
- else if ( key.equals( "show_custom_node_shapes" ) ) {
- key_index = Configuration.show_custom_node_shapes;
- }
// If we've found the key, set the values
if ( key_index >= 0 ) {
display_options[ key_index ][ 1 ] = ( String ) st.nextElement();
getSpeciesColors().put( ( ( String ) st.nextElement() ).replace( '_', ' ' ),
Color.decode( ( String ) st.nextElement() ) );
}
+ else if ( key.equals( "sequence_color" ) ) {
+ getSequenceColors().put( ( ( String ) st.nextElement() ).replace( '_', ' ' ),
+ Color.decode( ( String ) st.nextElement() ) );
+ }
else if ( key.equals( "domain_color" ) ) {
getDomainColors().put( ( String ) st.nextElement(), Color.decode( ( String ) st.nextElement() ) );
}