private boolean _abbreviate_scientific_names = false;
private boolean _color_labels_same_as_parent_branch = false;
private int _default_bootstrap_samples = -1;
+ private boolean _show_default_node_shapes = false;
private NodeShape _default_node_shape = NodeShape.NONE;
private NodeFill _default_node_fill = NodeFill.GRADIENT;
private short _default_node_shape_size = Constants.DEFAULT_NODE_SHAPE_SIZE_DEFAULT;
- private boolean _taxonomy_colorize_node_shapes_instead_of_labels = false;
+ private boolean _taxonomy_colorize_node_shapes = false;
final static int display_as_phylogram = 0;
final static int show_node_names = 1;
final static int show_tax_code = 2;
final static int color_according_to_species = 6;
final static int color_branches = 7;
final static int width_branches = 8;
- final static int show_domain_architectures = 9;
- final static int show_binary_characters = 10;
- final static int show_binary_character_counts = 11;
- final static int show_gene_names = 12;
- final static int show_sequence_acc = 13;
- final static int display_internal_data = 14;
- final static int dynamically_hide_data = 15;
- final static int show_taxonomy_scientific_names = 16;
- final static int show_taxonomy_common_names = 17;
- final static int color_according_to_annotation = 18;
- final static int show_property = 19;
- final static int show_gene_symbols = 20;
- final static int node_data_popup = 21;
- final static int show_relation_confidence = 22;
- final static int show_vector_data = 23;
- final static int show_taxonomy_images = 24;
+ final static int show_custom_node_shapes = 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_gene_names = 13;
+ final static int show_sequence_acc = 14;
+ final static int display_internal_data = 15;
+ final static int dynamically_hide_data = 16;
+ final static int show_taxonomy_scientific_names = 17;
+ final static int show_taxonomy_common_names = 18;
+ final static int color_according_to_annotation = 19;
+ final static int show_property = 20;
+ final static int show_gene_symbols = 21;
+ final static int node_data_popup = 22;
+ final static int show_relation_confidence = 23;
+ final static int show_vector_data = 24;
+ final static int show_taxonomy_images = 25;
// ------------------
// Click-to options
// ------------------
{ "Phylogram", "display", "?" }, { "Node Name", "display", "yes" }, { "Taxonomy Code", "display", "yes" },
{ "Annotation", "nodisplay", "no" }, { "Confidence Value", "display", "?" }, { "Event", "display", "?" },
{ "Taxonomy Colorize", "display", "yes" }, { "Colorize Branches", "display", "no" },
- { "Use Branch-Width", "nodisplay", "no" }, { "Domains", "nodisplay", "no" },
+ { "Use Branch-Width", "nodisplay", "no" }, { "Show Custom Nodes", "display", "yes"}, { "Domains", "nodisplay", "no" },
{ "Binary Characters", "nodisplay", "no" }, { "Binary Char Counts", "nodisplay", "no" },
{ "Prot/Gene Name", "display", "no" }, { "Prot/Gene Acc", "display", "no" },
{ "Show Internal Data", "display", "yes" }, { "Dyna Hide", "display", "yes" },
return _cladogram_type;
}
+
private int getClickToIndex( final String name ) {
int index = -1;
if ( name.equals( "edit_info" ) ) {
_domain_structure_base_color = Color.decode( ( String ) st.nextElement() );
}
//
+ else if ( key.equals( "show_default_node_shapes" ) ) {
+ setShowDefaultNodeShapes( parseBoolean( ( ( String ) st.nextElement() ).trim() ) );
+ }
else if ( key.equals( "default_node_size" ) ) {
final short i = parseShort( ( ( String ) st.nextElement() ).trim() );
setDefaultNodeShapeSize( i );
}
}
else if ( key.equals( "taxonomy_colorize_node_shapes" ) ) {
- setTaxonomyColorizeNodeShapesInsteadOfLabels( parseBoolean( ( String ) st.nextElement() ) );
+ setTaxonomyColorizeNodeShapes( parseBoolean( ( String ) st.nextElement() ) );
}
else if ( st.countTokens() >= 2 ) { // counts the tokens that are not
// yet retrieved!
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();
return _default_node_shape_size;
}
- private void setTaxonomyColorizeNodeShapesInsteadOfLabels( final boolean taxonomy_colorize_node_shapes_instead_of_labels ) {
- _taxonomy_colorize_node_shapes_instead_of_labels = taxonomy_colorize_node_shapes_instead_of_labels;
+ private void setTaxonomyColorizeNodeShapes( final boolean taxonomy_colorize_node_shapes ) {
+ _taxonomy_colorize_node_shapes = taxonomy_colorize_node_shapes;
}
- public boolean isTaxonomyColorizeNodeShapesInsteadOfLabels() {
- return _taxonomy_colorize_node_shapes_instead_of_labels;
+ public boolean isTaxonomyColorizeNodeShapes() {
+ return _taxonomy_colorize_node_shapes;
}
+
+ public boolean isShowDefaultNodeShapes() {
+ return _show_default_node_shapes;
+ }
+ private void setShowDefaultNodeShapes(boolean show_default_node_shapes) {
+ _show_default_node_shapes =show_default_node_shapes;
+ }
+
}
import java.util.Locale;
import java.util.Map;
+import javax.swing.Icon;
import javax.swing.JApplet;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JFrame;
static final String SCREEN_ANTIALIAS_LABEL = "Antialias";
static final String COLOR_LABELS_LABEL = "Colorize Labels Same as Parent Branch";
static final String BG_GRAD_LABEL = "Background Color Gradient";
- static final String DISPLAY_NODE_BOXES_LABEL = "Display Node Boxes";
+ static final String DISPLAY_NODE_BOXES_LABEL = "Display Node Shapes";
static final String SHOW_OVERVIEW_LABEL = "Show Overview";
static final String FONT_SIZE_MENU_LABEL = "Font Size";
static final String NONUNIFORM_CLADOGRAMS_LABEL = "External Node Sum Dependent Cladograms";
static final String SHOW_DOMAIN_LABELS_LABEL = "Show Domain Labels";
static final String COLOR_LABELS_TIP = "To use parent branch colors for node labels as well, need to turn off taxonomy dependent colorization and turn on branch colorization for this to become apparent";
static final String ABBREV_SN_LABEL = "Abbreviate Scientific Taxonomic Names";
+ static final String TAXONOMY_COLORIZE_NODE_SHAPES_LABEL = "Colorize Node Shapes According to Taxonomy";
+ static final String CYCLE_NODE_SHAPE_LABEL = "Cycle Node Shapes";
+ static final String CYCLE_NODE_FILL_LABEL = "Cycle Node Fill Type";
+ static final String CHOOSE_NODE_SIZE_LABEL = "Choose Node Shape Size";
JMenuBar _jmenubar;
JMenu _file_jmenu;
JMenu _tools_menu;
// _ screen display
JCheckBoxMenuItem _screen_antialias_cbmi;
JCheckBoxMenuItem _background_gradient_cbmi;
- JCheckBoxMenuItem _show_node_boxes_cbmi;
+
JRadioButtonMenuItem _non_lined_up_cladograms_rbmi;
JRadioButtonMenuItem _uniform_cladograms_rbmi;
JRadioButtonMenuItem _ext_node_dependent_cladogram_rbmi;
JCheckBoxMenuItem _color_labels_same_as_parent_branch;
JMenuItem _overview_placment_mi;
JMenuItem _choose_minimal_confidence_mi;
+
+ JCheckBoxMenuItem _show_default_node_shapes_cbmi;
+ JMenuItem _cycle_node_shape_mi;
+ JMenuItem _cycle_node_fill_mi;
+ JMenuItem _choose_node_size_mi;
+ JCheckBoxMenuItem _taxonomy_colorize_node_shapes_cbmi;
// _ print
JCheckBoxMenuItem _graphics_export_visible_only_cbmi;
JCheckBoxMenuItem _antialias_print_cbmi;
else if ( o == _color_labels_same_as_parent_branch ) {
updateOptions( getOptions() );
}
- else if ( o == _show_node_boxes_cbmi ) {
+ else if ( o == _show_default_node_shapes_cbmi ) {
updateOptions( getOptions() );
}
+ else if ( o == _taxonomy_colorize_node_shapes_cbmi ) {
+ updateOptions( getOptions() );
+ }
+
else if ( o == _non_lined_up_cladograms_rbmi ) {
updateOptions( getOptions() );
showWhole();
options.setColorLabelsSameAsParentBranch( ( _color_labels_same_as_parent_branch != null )
&& _color_labels_same_as_parent_branch.isSelected() );
//TODO FIXME ~~
- //options.setShowNodeBoxes( ( _show_node_boxes_cbmi != null ) && _show_node_boxes_cbmi.isSelected() );
+ options.setShowDefaultNodeShapes( ( _show_default_node_shapes_cbmi != null ) && _show_default_node_shapes_cbmi.isSelected() );
+ options.setTaxonomyColorizeNodeShapes( ( _taxonomy_colorize_node_shapes_cbmi != null ) && _taxonomy_colorize_node_shapes_cbmi.isSelected() );
+
//TODO FIXME ~~
if ( ( _non_lined_up_cladograms_rbmi != null ) && ( _non_lined_up_cladograms_rbmi.isSelected() ) ) {
options.setCladogramType( CLADOGRAM_TYPE.NON_LINED_UP );
_radio_group_1.add( _ext_node_dependent_cladogram_rbmi );
_radio_group_1.add( _uniform_cladograms_rbmi );
_radio_group_1.add( _non_lined_up_cladograms_rbmi );
- _options_jmenu.add( _show_node_boxes_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL ) );
+ _options_jmenu.add( _show_default_node_shapes_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL ) );
_options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_SCALE_LABEL ) );
_options_jmenu
.add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) );
customizeJMenuItem( _switch_colors_mi );
customizeJMenuItem( _choose_minimal_confidence_mi );
customizeJMenuItem( _overview_placment_mi );
- customizeCheckBoxMenuItem( _show_node_boxes_cbmi, getOptions().getDefaultNodeShape() );
+ customizeCheckBoxMenuItem( _show_default_node_shapes_cbmi, getOptions().getDefaultNodeShape() );
customizeCheckBoxMenuItem( _color_labels_same_as_parent_branch, getOptions().isColorLabelsSameAsParentBranch() );
customizeCheckBoxMenuItem( _screen_antialias_cbmi, getOptions().isAntialiasScreen() );
customizeCheckBoxMenuItem( _background_gradient_cbmi, getOptions().isBackgroundColorGradient() );
import java.util.Set;
import javax.swing.ButtonGroup;
+import javax.swing.Icon;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JFileChooser;
import javax.swing.JMenu;
private final static SequencesFileFilter seqsfilter = new SequencesFileFilter();
private final static DefaultFilter defaultfilter = new DefaultFilter();
private static final long serialVersionUID = -799735726778865234L;
+
private final JFileChooser _values_filechooser;
private final JFileChooser _open_filechooser;
private final JFileChooser _msa_filechooser;
_radio_group_1.add( _ext_node_dependent_cladogram_rbmi );
_radio_group_1.add( _uniform_cladograms_rbmi );
_radio_group_1.add( _non_lined_up_cladograms_rbmi );
- _options_jmenu.add( _show_node_boxes_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL ) );
+
+ //
+ _options_jmenu.add( _show_default_node_shapes_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL ) );
+
+
+ _options_jmenu.add( _taxonomy_colorize_node_shapes_cbmi = new JCheckBoxMenuItem( MainFrame.TAXONOMY_COLORIZE_NODE_SHAPES_LABEL) );
+ _options_jmenu.add( _cycle_node_shape_mi = new JMenuItem( MainFrame.CYCLE_NODE_SHAPE_LABEL));
+ _options_jmenu.add( _cycle_node_fill_mi = new JMenuItem( MainFrame.CYCLE_NODE_FILL_LABEL ));
+ _options_jmenu.add( _choose_node_size_mi = new JMenuItem( MainFrame.CHOOSE_NODE_SIZE_LABEL ));
+ //
+
_options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( DISPLAY_SCALE_LABEL ) );
_options_jmenu
.add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) );
customizeJMenuItem( _choose_pdf_width_mi );
customizeJMenuItem( _overview_placment_mi );
//TODO FIXME ~~
- //customizeCheckBoxMenuItem( _show_node_boxes_cbmi, getOptions().getDefaultNodeShape() );
+ customizeCheckBoxMenuItem( _show_default_node_shapes_cbmi, getOptions().isShowDefaultNodeShapes() );
+ customizeCheckBoxMenuItem( _taxonomy_colorize_node_shapes_cbmi, getOptions().isTaxonomyColorizeNodeShapes() );
+ customizeJMenuItem( _cycle_node_shape_mi );
+ customizeJMenuItem( _cycle_node_fill_mi );
+ customizeJMenuItem( _choose_node_size_mi );
//TODO FIXME ~~
customizeCheckBoxMenuItem( _color_labels_same_as_parent_branch, getOptions().isColorLabelsSameAsParentBranch() );
customizeCheckBoxMenuItem( _screen_antialias_cbmi, getOptions().isAntialiasScreen() );
private NodeShape _default_node_shape;
private NodeFill _default_node_fill;
private short _default_node_shape_size;
- private boolean _taxonomy_colorize_node_shapes_instead_of_labels;
+ private boolean _taxonomy_colorize_node_shapes;
+ private boolean _show_default_node_shapes;
private Options() {
init();
return _cladogram_type;
}
- int getDefaultNodeBoxSize() {
- // TODO make variable ~~
- return 8;
- }
-
final NodeFill getDefaultNodeFill() {
return _default_node_fill;
}
_default_node_shape = NodeShape.NONE;
_default_node_fill = NodeFill.GRADIENT;
_default_node_shape_size = Constants.DEFAULT_NODE_SHAPE_SIZE_DEFAULT;
- _taxonomy_colorize_node_shapes_instead_of_labels = false;
+ _taxonomy_colorize_node_shapes = false;
_show_branch_length_values = false;
_internal_number_are_confidence_for_nh_parsing = false;
_show_scale = false;
_graphics_export_visible_only = false;
_editable = true;
_background_color_gradient = false;
+ _show_default_node_shapes = false;
if ( Util.isUsOrCanada() ) {
_print_size_x = Constants.US_LETTER_SIZE_X;
_print_size_y = Constants.US_LETTER_SIZE_Y;
return _show_scale;
}
- boolean isTaxonomyColorizeNodeShapesInsteadOfLabels() {
- return _taxonomy_colorize_node_shapes_instead_of_labels;
+ boolean isTaxonomyColorizeNodeShapes() {
+ return _taxonomy_colorize_node_shapes;
}
final void setAbbreviateScientificTaxonNames( final boolean abbreviate_scientific_names ) {
_show_scale = show_scale;
}
- void setTaxonomyColorizeNodeShapesInsteadOfLabels( final boolean taxonomy_colorize_node_shapes_instead_of_labels ) {
- _taxonomy_colorize_node_shapes_instead_of_labels = taxonomy_colorize_node_shapes_instead_of_labels;
+ void setTaxonomyColorizeNodeShapes( final boolean taxonomy_colorize_node_shapes ) {
+ _taxonomy_colorize_node_shapes = taxonomy_colorize_node_shapes;
}
final static Options createDefaultInstance() {
return new Options();
}
+ boolean isShowDefaultNodeShapes() {
+ return _show_default_node_shapes;
+ }
+ void setShowDefaultNodeShapes(boolean show_default_node_shapes) {
+ _show_default_node_shapes = show_default_node_shapes;
+ }
final static Options createInstance( final Configuration configuration ) {
final Options instance = createDefaultInstance();
if ( configuration != null ) {
if ( configuration.getDefaultNodeShapeSize() >= 0 ) {
instance.setDefaultNodeShapeSize( configuration.getDefaultNodeShapeSize() );
}
- instance.setTaxonomyColorizeNodeShapesInsteadOfLabels( configuration
- .isTaxonomyColorizeNodeShapesInsteadOfLabels() );
+ instance.setTaxonomyColorizeNodeShapes( configuration
+ .isTaxonomyColorizeNodeShapes() );
+ instance.setShowDefaultNodeShapes( configuration.isShowDefaultNodeShapes() );
}
return instance;
}
_configuration = configuration;
_phylogeny = t;
_phy_has_branch_lengths = ForesterUtil.isHasAtLeastOneBranchLengthLargerThanZero( _phylogeny );
- _box_size = tjp.getOptions().getDefaultNodeBoxSize();
- _half_box_size = tjp.getOptions().getDefaultNodeBoxSize() / 2;
+ _box_size = tjp.getOptions().getDefaultNodeShapeSize();
+ _half_box_size = tjp.getOptions().getDefaultNodeShapeSize() / 2;
_half_box_size_plus_wiggle = _half_box_size + WIGGLE;
init();
// if ( !_phylogeny.isEmpty() ) {