import java.io.File;\r
import java.io.IOException;\r
import java.util.ArrayList;\r
-import java.util.HashSet;\r
import java.util.LinkedList;\r
import java.util.List;\r
import java.util.Locale;\r
import java.util.NoSuchElementException;\r
-import java.util.Set;\r
\r
import javax.swing.Box;\r
import javax.swing.JApplet;\r
public abstract class MainFrame extends JFrame implements ActionListener {\r
\r
static final String USE_MOUSEWHEEL_SHIFT_TO_ROTATE = "In this display type, use mousewheel + Shift to rotate [or A and S]";\r
- static final String PHYLOXML_REF_TOOL_TIP = Constants.PHYLOXML_REFERENCE; //TODO //FIXME\r
+ static final String PHYLOXML_REF_TOOL_TIP = Constants.PHYLOXML_REFERENCE; //TODO //FIXME\r
static final String APTX_REF_TOOL_TIP = Constants.APTX_REFERENCE;\r
private static final long serialVersionUID = 3655000897845508358L;\r
final static Font menu_font = new Font( Configuration.getDefaultFontFamilyName(),\r
static final String TRIANGULAR_TYPE_CBMI_LABEL = "Triangular";\r
static final String CONVEX_TYPE_CBMI_LABEL = "Convex";\r
static final String ROUNDED_TYPE_CBMI_LABEL = "Rounded";\r
- static final String UNROOTED_TYPE_CBMI_LABEL = "Unrooted (alpha)"; //TODO\r
- static final String CIRCULAR_TYPE_CBMI_LABEL = "Circular (alpha)"; //TODO\r
+ static final String UNROOTED_TYPE_CBMI_LABEL = "Unrooted (alpha)"; //TODO\r
+ static final String CIRCULAR_TYPE_CBMI_LABEL = "Circular (alpha)"; //TODO\r
static final String OPTIONS_HEADER = "Options";\r
static final String SEARCH_SUBHEADER = "Search:";\r
static final String DISPLAY_SUBHEADER = "Display:";\r
static final String SEARCH_TERMS_ONLY_LABEL = "Match Complete Terms Only";\r
+ static final String SEARCH_REGEX_LABEL = "Search with Regular Expressions";\r
static final String SEARCH_CASE_SENSITIVE_LABEL = "Case Sensitive";\r
static final String INVERSE_SEARCH_RESULT_LABEL = "Negate Result";\r
- static final String DISPLAY_BRANCH_LENGTH_VALUES_LABEL = "Branch Length Values";\r
static final String COLOR_BY_TAXONOMIC_GROUP = "Colorize by Taxonomic Group";\r
static final String DISPLAY_SCALE_LABEL = "Scale";\r
static final String NON_LINED_UP_CLADOGRAMS_LABEL = "Non-Lined Up Cladograms";\r
static final String UNIFORM_CLADOGRAMS_LABEL = "Total Node Sum Dependent Cladograms";\r
static final String LABEL_DIRECTION_LABEL = "Radial Labels";\r
static final String LABEL_DIRECTION_TIP = "To use radial node labels in radial and unrooted display types";\r
+ static final String SEARCH_WITH_REGEX_TIP = "To search using regular expressions (~Java/Perl syntax). For example, use \"^B.+\\d{2,}$\" to search for everything starting with a B and ending with at least two digits.";\r
static final String SCREEN_ANTIALIAS_LABEL = "Antialias";\r
static final String COLOR_LABELS_LABEL = "Colorize Labels Same as Parent Branch";\r
static final String BG_GRAD_LABEL = "Background Color Gradient";\r
- static final String DISPLAY_NODE_BOXES_LABEL_EXT = "External Node Shapes";\r
- static final String DISPLAY_NODE_BOXES_LABEL_INT = "Internal Node Shapes";\r
+ static final String DISPLAY_NODE_BOXES_LABEL_EXT = "Shapes for External Nodes";\r
+ static final String DISPLAY_NODE_BOXES_LABEL_INT = "Shapes for Internal Nodes";\r
+ static final String DISPLAY_NODE_BOXES_LABEL_MARKED = "Shapes for Nodes with Visual Data";\r
static final String SHOW_OVERVIEW_LABEL = "Overview";\r
static final String FONT_SIZE_MENU_LABEL = "Font Size";\r
static final String NONUNIFORM_CLADOGRAMS_LABEL = "External Node Sum Dependent Cladograms";\r
static final String USE_BRACKETS_FOR_CONF_IN_NH_LABEL = "Use Brackets for Confidence Values";\r
static final String USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL = "Use Internal Node Names for Confidence Values";\r
static final String SHOW_BASIC_TREE_INFORMATION_LABEL = "Basic Tree Information";\r
+ static final String RIGHT_LINE_UP_DOMAINS = "Right-align Domain Architectures";\r
+ static final String LINE_UP_RENDERABLE_DATA = "Line Up Diagrams (such as Domain Architectures)";\r
JMenuBar _jmenubar;\r
JMenu _file_jmenu;\r
JMenu _tools_menu;\r
JMenuItem _confcolor_item;\r
JMenuItem _color_rank_jmi;\r
JMenuItem _collapse_species_specific_subtrees;\r
- JMenuItem _collapse_below_threshold; //TODO implememt me\r
JMenuItem _obtain_detailed_taxonomic_information_jmi;\r
JMenuItem _obtain_detailed_taxonomic_information_deleting_jmi;\r
JMenuItem _obtain_seq_information_jmi;\r
JRadioButtonMenuItem _non_lined_up_cladograms_rbmi;\r
JRadioButtonMenuItem _uniform_cladograms_rbmi;\r
JRadioButtonMenuItem _ext_node_dependent_cladogram_rbmi;\r
- JCheckBoxMenuItem _show_branch_length_values_cbmi;\r
JCheckBoxMenuItem _color_by_taxonomic_group_cbmi;\r
- JCheckBoxMenuItem _show_scale_cbmi; //TODO fix me\r
+ JCheckBoxMenuItem _show_scale_cbmi; //TODO fix me\r
JCheckBoxMenuItem _show_overview_cbmi;\r
JCheckBoxMenuItem _show_domain_labels;\r
JCheckBoxMenuItem _show_annotation_ref_source;\r
JMenuItem _choose_minimal_confidence_mi;\r
JCheckBoxMenuItem _show_default_node_shapes_internal_cbmi;\r
JCheckBoxMenuItem _show_default_node_shapes_external_cbmi;\r
+ JCheckBoxMenuItem _show_default_node_shapes_for_marked_cbmi;\r
JMenuItem _cycle_node_shape_mi;\r
JMenuItem _cycle_node_fill_mi;\r
JMenuItem _choose_node_size_mi;\r
JCheckBoxMenuItem _show_confidence_stddev_cbmi;\r
+ JCheckBoxMenuItem _right_line_up_domains_cbmi;\r
+ JCheckBoxMenuItem _line_up_renderable_data_cbmi;\r
// _ print\r
JCheckBoxMenuItem _graphics_export_visible_only_cbmi;\r
JCheckBoxMenuItem _antialias_print_cbmi;\r
JCheckBoxMenuItem _search_case_senstive_cbmi;\r
JCheckBoxMenuItem _search_whole_words_only_cbmi;\r
JCheckBoxMenuItem _inverse_search_result_cbmi;\r
+ JCheckBoxMenuItem _search_with_regex_cbmi;\r
// type menu:\r
JMenu _type_menu;\r
JCheckBoxMenuItem _rectangular_type_cbmi;\r
// Handy pointers to child components:\r
MainPanel _mainpanel;\r
Container _contentpane;\r
- final LinkedList<TextFrame> _textframes = new LinkedList<TextFrame>(); ;\r
+ final LinkedList<TextFrame> _textframes = new LinkedList<TextFrame>(); ;\r
Configuration _configuration;\r
Options _options;\r
private Phylogeny _species_tree;\r
switchColors();\r
}\r
else if ( o == _display_basic_information_item ) {\r
- displayBasicInformation( getCurrentTreePanel().getTreeFile() );\r
+ if ( getCurrentTreePanel() != null ) {\r
+ displayBasicInformation( getCurrentTreePanel().getTreeFile() );\r
+ }\r
}\r
else if ( o == _view_as_NH_item ) {\r
viewAsNH();\r
else if ( o == _show_default_node_shapes_external_cbmi ) {\r
updateOptions( getOptions() );\r
}\r
+ else if ( o == _show_default_node_shapes_for_marked_cbmi ) {\r
+ updateOptions( getOptions() );\r
+ }\r
else if ( o == _non_lined_up_cladograms_rbmi ) {\r
updateOptions( getOptions() );\r
showWhole();\r
getMainPanel().getControlPanel().search1();\r
}\r
else if ( o == _search_whole_words_only_cbmi ) {\r
+ if ( ( _search_with_regex_cbmi != null ) && _search_whole_words_only_cbmi.isSelected() ) {\r
+ _search_with_regex_cbmi.setSelected( false );\r
+ }\r
updateOptions( getOptions() );\r
getMainPanel().getControlPanel().search0();\r
getMainPanel().getControlPanel().search1();\r
getMainPanel().getControlPanel().search0();\r
getMainPanel().getControlPanel().search1();\r
}\r
- else if ( o == _show_scale_cbmi ) {\r
+ else if ( o == _search_with_regex_cbmi ) {\r
+ if ( ( _search_whole_words_only_cbmi != null ) && _search_with_regex_cbmi.isSelected() ) {\r
+ _search_whole_words_only_cbmi.setSelected( false );\r
+ }\r
+ if ( ( _search_case_senstive_cbmi != null ) && _search_with_regex_cbmi.isSelected() ) {\r
+ _search_case_senstive_cbmi.setSelected( true );\r
+ }\r
updateOptions( getOptions() );\r
+ getMainPanel().getControlPanel().search0();\r
+ getMainPanel().getControlPanel().search1();\r
}\r
- else if ( o == _show_branch_length_values_cbmi ) {\r
+ else if ( o == _show_scale_cbmi ) {\r
updateOptions( getOptions() );\r
}\r
else if ( o == _color_by_taxonomic_group_cbmi ) {\r
getCurrentTreePanel().updateOvSizes();\r
}\r
}\r
+ else if ( o == _line_up_renderable_data_cbmi ) {\r
+ if ( !_line_up_renderable_data_cbmi.isSelected() ) {\r
+ _right_line_up_domains_cbmi.setSelected( false );\r
+ }\r
+ updateOptions( getOptions() );\r
+ }\r
+ else if ( o == _right_line_up_domains_cbmi ) {\r
+ if ( _right_line_up_domains_cbmi.isSelected() ) {\r
+ _line_up_renderable_data_cbmi.setSelected( true );\r
+ }\r
+ updateOptions( getOptions() );\r
+ }\r
else if ( ( o == _rectangular_type_cbmi ) || ( o == _triangular_type_cbmi ) || ( o == _curved_type_cbmi )\r
|| ( o == _convex_type_cbmi ) || ( o == _euro_type_cbmi ) || ( o == _rounded_type_cbmi )\r
|| ( o == _unrooted_type_cbmi ) || ( o == _circular_type_cbmi ) ) {\r
typeChanged( o );\r
}\r
- \r
else if ( o == _about_item ) {\r
about();\r
}\r
else if ( o == _help_item ) {\r
- help();\r
+ try {\r
+ AptxUtil.openWebsite( Constants.APTX_DOC_SITE, is_applet, applet );\r
+ }\r
+ catch ( final IOException e1 ) {\r
+ ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );\r
+ }\r
}\r
else if ( o == _website_item ) {\r
try {\r
_contentpane.repaint();\r
}\r
\r
- private void deleteSelectedNodes( boolean delete ) {\r
+ private void deleteSelectedNodes( final boolean delete ) {\r
final Phylogeny phy = getMainPanel().getCurrentPhylogeny();\r
- if ( phy == null || phy.getNumberOfExternalNodes() < 2 ) {\r
+ if ( ( phy == null ) || ( phy.getNumberOfExternalNodes() < 2 ) ) {\r
return;\r
}\r
- List<PhylogenyNode> nodes = new ArrayList<PhylogenyNode>();\r
+ final List<PhylogenyNode> nodes = new ArrayList<PhylogenyNode>();\r
if ( ( getCurrentTreePanel().getFoundNodes0() != null ) || ( getCurrentTreePanel().getFoundNodes1() != null ) ) {\r
- final List<PhylogenyNode> all_selected_nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes();\r
+ final List<PhylogenyNode> all_selected_nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes();\r
for( final PhylogenyNode n : all_selected_nodes ) {\r
if ( n.isExternal() ) {\r
nodes.add( n );\r
}\r
}\r
}\r
- \r
String function = "Retain";\r
if ( delete ) {\r
function = "Delete";\r
* has been selected by the user by clicking the "Return ..."\r
* menu item. This method is expected to be called from Javascript or\r
* something like it.\r
- * \r
+ *\r
* @return current external node data as String\r
*/\r
public String getCurrentExternalNodesDataBuffer() {\r
\r
void buildHelpMenu() {\r
_help_jmenu = createMenu( "Help", getConfiguration() );\r
- _help_jmenu.add( _help_item = new JMenuItem( "Help" ) );\r
+ _help_jmenu.add( _help_item = new JMenuItem( "Documentation" ) );\r
+ _help_jmenu.addSeparator();\r
_help_jmenu.add( _website_item = new JMenuItem( "Archaeopteryx Home" ) );\r
- _aptx_ref_item = new JMenuItem( "Archaeopteryx Reference" );\r
+ _aptx_ref_item = new JMenuItem( "Archaeopteryx Reference" ); //TODO need to add this...\r
_help_jmenu.add( _phyloxml_website_item = new JMenuItem( "phyloXML Home" ) );\r
_help_jmenu.add( _phyloxml_ref_item = new JMenuItem( "phyloXML Reference" ) );\r
_help_jmenu.addSeparator();\r
return _species_tree;\r
}\r
\r
- void help() {\r
- final StringBuilder sb = new StringBuilder();\r
- sb.append( "Display options\n" );\r
- sb.append( "-------------------\n" );\r
- sb.append( "Use the checkboxes to select types of information to display on the tree.\n\n" );\r
- sb.append( "Clickable tree nodes\n" );\r
- sb.append( "--------------------\n" );\r
- sb.append( "Tree nodes can be clicked, the action is determined by the 'click on node to' menu\n" );\r
- sb.append( "or by right clicking:\n" );\r
- sb.append( "o Display Node Data -- display information for a node\n" );\r
- sb.append( "o Collapse/Uncollapse -- collapse and uncollapse subtree from clicked node\n" );\r
- sb.append( "o Root/Reroot -- change tree root to clicked node\n" );\r
- sb.append( "o Sub/Super Tree -- toggle between subtree from clicked node and whole tree\n" );\r
- sb.append( "o Swap Descendants -- switch descendant on either side of clicked node\n" );\r
- sb.append( "o Colorize Subtree -- color a subtree\n" );\r
- sb.append( "o Open Sequence Web -- launch a web browser to display sequence information\n" );\r
- sb.append( "o Open Taxonomy Web -- launch a web browser to display taxonomy information\n" );\r
- sb.append( "- there may be additional choices depending on this particular setup\n\n" );\r
- sb.append( "Right clicking on a node always displays the information of a node.\n\n" );\r
- sb.append( "Zooming\n" );\r
- sb.append( "---------\n" );\r
- sb.append( "The mouse wheel and the plus and minus keys control zooming.\n" );\r
- sb.append( "Mouse wheel+Ctrl changes the text size.\n" );\r
- sb.append( "Mouse wheel+Shift controls zooming in vertical direction only.\n" );\r
- sb.append( "Use the buttons on the control panel to zoom the tree in and out, horizontally or vertically.\n" );\r
- sb.append( "The entire tree can be fitted into the window by clicking the \"F\" button, or by pressing F, Delete, or Home.\n" );\r
- sb.append( "The up, down, left, and right keys can be used to move the visible part (if zoomed in).\n" );\r
- sb.append( "Up, down, left, and right+Shift can be used to control zooming horizontally and vertically.\n" );\r
- sb.append( "Plus and minus keys+Ctrl change the text size; F+Ctrl, Delete+Ctrl, or Home+Ctrl resets it.\n\n" );\r
- sb.append( "Quick tree manipulation:\n" );\r
- sb.append( "------------------------\n" );\r
- sb.append( "Order Subtrees -- order the tree by branch length\n" );\r
- sb.append( "Uncollapse All -- uncollapse any and all collapsed branches\n\n" );\r
- sb.append( "Memory problems (Java heap space error)\n" );\r
- sb.append( "---------------------------------------\n" );\r
- sb.append( "Since the Java default memory allocation is quite small, it might by necessary (for trees\n" );\r
- sb.append( "with more than approximately 5000 external nodes) to increase the memory which Java can use, with\n" );\r
- sb.append( "the '-Xmx' Java command line option. For example:\n" );\r
- sb.append( "java -Xmx1024m -cp path\\to\\forester.jar org.forester.archaeopteryx.Archaeopteryx\n\n" );\r
- // + "General remarks\n"\r
- // + "---------------\n"\r
- // +\r
- // "o The application version permits copying to the clipboard \n"\r
- // +\r
- // " in the \"View\"|\"View as ...\" frame (either by control-c or button press).\n"\r
- // +\r
- // "o Changes made to a subtree affect this subtree and its subtrees,\n"\r
- // + " but not any of its parent tree(s).\n"\r
- // +\r
- // "o Archaeopteryx tries to detect whether the numerical values in a NH tree\n"\r
- // +\r
- // " are likely to be bootstrap values instead of branch length values.\n\n"\r
- // +\r
- // " Remarks regarding SDI (Speciation Duplication Inference):\n"\r
- // +\r
- // "o Each external node of the gene tree (in display) needs to be associated with\n"\r
- // +\r
- // " a species: either directly through the \"Species\" field, or the species\n"\r
- // +\r
- // " is part of the sequence name in the form \"XXXX_SPECIES\"\n"\r
- // +\r
- // " (e.g. \"ACON_DROME\" or \"ACON_DROME/123-4489\" which is also acceptable).\n"\r
- // +\r
- // "o A species tree for each species of the gene tree needs to be loaded with\n"\r
- // +\r
- // " \"SDI\"|\"Load species tree\" prior the SDI execution.\n"\r
- // +\r
- // "o !External nodes of the gene tree associated with species not present in\n"\r
- // +\r
- // " the species tree are REMOVED prior to SDI execution!\n"\r
- // +\r
- // "o Both the gene tree and the species tree must be completely binary.\n"\r
- // +\r
- // "o Duplications and speciations are a function of the position of the root.\n"\r
- // +\r
- // " Hence, after each manual \"Root/Reroot\"ing some duplications will be\n"\r
- // + " incorrect and need to be inferred again\n"\r
- // +\r
- // " with: \"SDI\"|\"SDI (Speciation Duplication Inference)\n\n"\r
- sb.append( "phyloXML\n" );\r
- sb.append( "-------------------\n" );\r
- sb.append( "Reference: " + Constants.PHYLOXML_REFERENCE + "\n" );\r
- sb.append( "Website: " + Constants.PHYLOXML_WEB_SITE + "\n" );\r
- sb.append( "Version: " + ForesterConstants.PHYLO_XML_VERSION + "\n" );\r
- sb.append( "\n" );\r
- sb.append( "For more information: https://sites.google.com/site/cmzmasek/home/software/archaeopteryx\n" );\r
- sb.append( "Email: " + Constants.AUTHOR_EMAIL + "\n\n" );\r
- TextFrame.instantiate( sb.toString(), "Help", _textframes );\r
- }\r
-\r
void initializeTypeMenu( final Options options ) {\r
setTypeMenuToAllUnselected();\r
switch ( options.getPhylogenyGraphicsType() ) {\r
&& _show_default_node_shapes_internal_cbmi.isSelected() );\r
options.setShowDefaultNodeShapesExternal( ( _show_default_node_shapes_external_cbmi != null )\r
&& _show_default_node_shapes_external_cbmi.isSelected() );\r
+ options.setShowDefaultNodeShapesForMarkedNodes( ( _show_default_node_shapes_for_marked_cbmi != null )\r
+ && _show_default_node_shapes_for_marked_cbmi.isSelected() );\r
if ( ( _non_lined_up_cladograms_rbmi != null ) && ( _non_lined_up_cladograms_rbmi.isSelected() ) ) {\r
options.setCladogramType( CLADOGRAM_TYPE.NON_LINED_UP );\r
}\r
options.setShowOverview( ( _show_overview_cbmi != null ) && _show_overview_cbmi.isSelected() );\r
options.setShowConfidenceStddev( ( _show_confidence_stddev_cbmi != null )\r
&& _show_confidence_stddev_cbmi.isSelected() );\r
- if ( ( _show_branch_length_values_cbmi != null ) && _show_branch_length_values_cbmi.isEnabled() ) {\r
- options.setShowBranchLengthValues( _show_branch_length_values_cbmi.isSelected() );\r
- }\r
if ( ( _color_by_taxonomic_group_cbmi != null ) && _color_by_taxonomic_group_cbmi.isEnabled() ) {\r
options.setColorByTaxonomicGroup( _color_by_taxonomic_group_cbmi.isSelected() );\r
}\r
&& _allow_errors_in_distance_to_parent_cbmi.isSelected() );\r
options.setMatchWholeTermsOnly( ( _search_whole_words_only_cbmi != null )\r
&& _search_whole_words_only_cbmi.isSelected() );\r
+ options.setSearchWithRegex( ( _search_with_regex_cbmi != null ) && _search_with_regex_cbmi.isSelected() );\r
options.setInverseSearchResult( ( _inverse_search_result_cbmi != null )\r
&& _inverse_search_result_cbmi.isSelected() );\r
if ( _graphics_export_visible_only_cbmi != null ) {\r
else if ( ( _circular_type_cbmi != null ) && _circular_type_cbmi.isSelected() ) {\r
options.setPhylogenyGraphicsType( PHYLOGENY_GRAPHICS_TYPE.CIRCULAR );\r
}\r
+ if ( ( _right_line_up_domains_cbmi != null ) && _right_line_up_domains_cbmi.isEnabled() ) {\r
+ options.setRightLineUpDomains( _right_line_up_domains_cbmi.isSelected() );\r
+ }\r
+ if ( ( _line_up_renderable_data_cbmi != null ) && _line_up_renderable_data_cbmi.isEnabled() ) {\r
+ options.setLineUpRendarableNodeData( _line_up_renderable_data_cbmi.isSelected() );\r
+ }\r
}\r
\r
void updateTypeCheckboxes( final Options options, final Object o ) {\r
*/\r
static void about() {\r
final StringBuffer about = new StringBuffer( "Archaeopteryx\nVersion " + Constants.VERSION + "\n" );\r
- about.append( "Copyright (C) 2013 Christian M. Zmasek\n" );\r
+ about.append( "Copyright (C) 2014 Christian M Zmasek\n" );\r
about.append( "All Rights Reserved\n" );\r
about.append( "License: GNU Lesser General Public License (LGPL)\n" );\r
about.append( "Last modified: " + Constants.PRG_DATE + "\n" );\r
about.append( Constants.PHYLOXML_REFERENCE_SHORT + "\n" );\r
about.append( "For more information & download:\n" );\r
about.append( Constants.APTX_WEB_SITE + "\n" );\r
+ about.append( "Documentation:\n" );\r
+ about.append( Constants.APTX_DOC_SITE + "\n" );\r
about.append( "Comments: " + Constants.AUTHOR_EMAIL );\r
JOptionPane.showMessageDialog( null, about, Constants.PRG_NAME, JOptionPane.PLAIN_MESSAGE );\r
}\r
mi.setText( "Enter Default Node Shape Size... (current: " + options.getDefaultNodeShapeSize() + ")" );\r
}\r
\r
- static void updateOptionsMenuDependingOnPhylogenyType( final MainPanel main_panel,\r
- final JCheckBoxMenuItem scale,\r
- final JCheckBoxMenuItem branch_lengths,\r
- final JRadioButtonMenuItem non_lined_up,\r
- final JRadioButtonMenuItem uniform_clado,\r
- final JRadioButtonMenuItem nonuniform_clado,\r
- final JCheckBoxMenuItem label_direction_cbmi ) {\r
- final TreePanel tree_panel = main_panel.getCurrentTreePanel();\r
- final ControlPanel control = main_panel.getControlPanel();\r
- final Options options = main_panel.getOptions();\r
- scale.setSelected( options.isShowScale() );\r
- branch_lengths.setSelected( options.isShowBranchLengthValues() );\r
- // non_lined_up.setSelected( options.isNonLinedUpCladogram() );\r
- if ( ( tree_panel != null ) && ( !tree_panel.isPhyHasBranchLengths() ) ) {\r
- scale.setSelected( false );\r
- scale.setEnabled( false );\r
- branch_lengths.setSelected( false );\r
- branch_lengths.setEnabled( false );\r
- }\r
- else if ( ( tree_panel != null ) && !control.isDrawPhylogram() ) {\r
- scale.setSelected( false );\r
- scale.setEnabled( false );\r
- branch_lengths.setEnabled( true );\r
- }\r
- else {\r
- scale.setEnabled( true );\r
- branch_lengths.setEnabled( true );\r
- }\r
- if ( ( tree_panel != null )\r
- && ( ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.ROUNDED )\r
- && ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) && ( tree_panel\r
- .getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR ) ) ) {\r
- branch_lengths.setSelected( false );\r
- branch_lengths.setEnabled( false );\r
- }\r
- if ( tree_panel != null ) {\r
- if ( ( tree_panel.getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR )\r
- || ( tree_panel.getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.UNROOTED ) ) {\r
- non_lined_up.setEnabled( false );\r
- uniform_clado.setEnabled( false );\r
- nonuniform_clado.setEnabled( false );\r
- }\r
- else {\r
- non_lined_up.setEnabled( true );\r
- uniform_clado.setEnabled( true );\r
- nonuniform_clado.setEnabled( true );\r
- }\r
- }\r
- else {\r
- if ( ( tree_panel != null )\r
- && ( ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) && ( tree_panel\r
- .getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR ) ) ) {\r
- branch_lengths.setSelected( false );\r
- branch_lengths.setEnabled( false );\r
- }\r
- if ( ( tree_panel != null )\r
- && ( ( tree_panel.getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) || ( tree_panel\r
- .getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.UNROOTED ) ) ) {\r
- non_lined_up.setEnabled( false );\r
- }\r
- else {\r
- // non_lined_up.setSelected( options.isNonLinedUpCladogram() );\r
- non_lined_up.setEnabled( true );\r
- }\r
- }\r
- label_direction_cbmi.setEnabled( true );\r
- if ( tree_panel != null ) {\r
- if ( ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.UNROOTED )\r
- && ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) ) {\r
- label_direction_cbmi.setEnabled( false );\r
- }\r
- if ( tree_panel.getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) {\r
- scale.setSelected( false );\r
- scale.setEnabled( false );\r
- }\r
- }\r
- }\r
-\r
static void updateScreenTextAntialias( final List<TreePanel> treepanels ) {\r
for( final TreePanel tree_panel : treepanels ) {\r
tree_panel.setTextAntialias();\r