import org.forester.archaeopteryx.Options.CLADOGRAM_TYPE;\r
import org.forester.archaeopteryx.Options.NODE_LABEL_DIRECTION;\r
import org.forester.archaeopteryx.Options.PHYLOGENY_GRAPHICS_TYPE;\r
-import org.forester.archaeopteryx.tools.AncestralTaxonomyInferrer;\r
import org.forester.archaeopteryx.tools.InferenceManager;\r
import org.forester.archaeopteryx.tools.PhyloInferenceDialog;\r
import org.forester.archaeopteryx.tools.PhylogeneticInferenceOptions;\r
\r
public final class MainFrameApplication extends MainFrame {\r
\r
- static final String INFER_ANCESTOR_TAXONOMIES = "Infer Ancestor Taxonomies";\r
- static final String OBTAIN_DETAILED_TAXONOMIC_INFORMATION = "Obtain Detailed Taxonomic Information";\r
- private final static int FRAME_X_SIZE = 800;\r
- private final static int FRAME_Y_SIZE = 800;\r
+ private final static int FRAME_X_SIZE = 800;\r
+ private final static int FRAME_Y_SIZE = 800;\r
// Filters for the file-open dialog (classes defined in this file)\r
- private static final long serialVersionUID = -799735726778865234L;\r
- private static final boolean PREPROCESS_TREES = false;\r
+ private static final long serialVersionUID = -799735726778865234L;\r
+ private static final boolean PREPROCESS_TREES = false;\r
private final JFileChooser _values_filechooser;\r
private final JFileChooser _sequences_filechooser;\r
private final JFileChooser _open_filechooser;\r
private ButtonGroup _radio_group_1;\r
private ButtonGroup _radio_group_2;\r
// Others:\r
- double _min_not_collapse = Constants.MIN_NOT_COLLAPSE_DEFAULT;\r
- double _min_not_collapse_bl = 0.001;\r
+ double _min_not_collapse = AptxConstants.MIN_NOT_COLLAPSE_DEFAULT;\r
+ double _min_not_collapse_bl = 0.001;\r
// Phylogeny Inference menu\r
private JMenu _inference_menu;\r
private JMenuItem _inference_from_msa_item;\r
private JMenuItem _inference_from_seqs_item;\r
// Phylogeny Inference\r
- private PhylogeneticInferenceOptions _phylogenetic_inference_options = null;\r
- private Msa _msa = null;\r
- private File _msa_file = null;\r
- private List<MolecularSequence> _seqs = null;\r
- private File _seqs_file = null;\r
+ private PhylogeneticInferenceOptions _phylogenetic_inference_options = null;\r
+ private Msa _msa = null;\r
+ private File _msa_file = null;\r
+ private List<MolecularSequence> _seqs = null;\r
+ private File _seqs_file = null;\r
JMenuItem _read_values_jmi;\r
JMenuItem _read_seqs_jmi;\r
\r
}\r
try {\r
boolean synth_exception = false;\r
- if ( Constants.__SYNTH_LF ) {\r
+ if ( AptxConstants.__SYNTH_LF ) {\r
try {\r
final SynthLookAndFeel synth = new SynthLookAndFeel();\r
synth.load( MainFrameApplication.class.getResourceAsStream( "/resources/synth_look_and_feel_1.xml" ),\r
}\r
catch ( final Exception ex ) {\r
synth_exception = true;\r
- ForesterUtil.printWarningMessage( Constants.PRG_NAME,\r
+ ForesterUtil.printWarningMessage( AptxConstants.PRG_NAME,\r
"could not create synth look and feel: "\r
+ ex.getLocalizedMessage() );\r
}\r
}\r
- if ( !Constants.__SYNTH_LF || synth_exception ) {\r
+ if ( !AptxConstants.__SYNTH_LF || synth_exception ) {\r
if ( _configuration.isUseNativeUI() ) {\r
UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );\r
}\r
setOptions( Options.createInstance( _configuration ) );\r
setInferenceManager( InferenceManager.createInstance( _configuration ) );\r
setPhylogeneticInferenceOptions( PhylogeneticInferenceOptions.createInstance( _configuration ) );\r
- // _textframe = null; #~~~~\r
// set title\r
- setTitle( Constants.PRG_NAME + " " + Constants.VERSION + " (" + Constants.PRG_DATE + ")" );\r
+ setTitle( AptxConstants.PRG_NAME + " " + AptxConstants.VERSION + " (" + AptxConstants.PRG_DATE + ")" );\r
_mainpanel = new MainPanel( _configuration, this );\r
// The file dialogs\r
_open_filechooser = new JFileChooser();\r
- _open_filechooser.setCurrentDirectory( new File( "." ) );\r
- _open_filechooser.setMultiSelectionEnabled( false );\r
+ _open_filechooser.setMultiSelectionEnabled( true );\r
_open_filechooser.addChoosableFileFilter( MainFrame.xmlfilter );\r
_open_filechooser.addChoosableFileFilter( MainFrame.nhxfilter );\r
_open_filechooser.addChoosableFileFilter( MainFrame.nhfilter );\r
_open_filechooser.addChoosableFileFilter( _open_filechooser.getAcceptAllFileFilter() );\r
_open_filechooser.setFileFilter( MainFrame.defaultfilter );\r
_open_filechooser_for_species_tree = new JFileChooser();\r
- _open_filechooser_for_species_tree.setCurrentDirectory( new File( "." ) );\r
_open_filechooser_for_species_tree.setMultiSelectionEnabled( false );\r
_open_filechooser_for_species_tree.addChoosableFileFilter( MainFrame.xmlfilter );\r
_open_filechooser_for_species_tree.addChoosableFileFilter( MainFrame.tolfilter );\r
_open_filechooser_for_species_tree.setFileFilter( MainFrame.xmlfilter );\r
- _save_filechooser = new JFileChooser();\r
- _save_filechooser.setCurrentDirectory( new File( "." ) );\r
- _save_filechooser.setMultiSelectionEnabled( false );\r
- _save_filechooser.setFileFilter( MainFrame.xmlfilter );\r
- _save_filechooser.addChoosableFileFilter( MainFrame.nhfilter );\r
- _save_filechooser.addChoosableFileFilter( MainFrame.nexusfilter );\r
- _save_filechooser.addChoosableFileFilter( _save_filechooser.getAcceptAllFileFilter() );\r
- _writetopdf_filechooser = new JFileChooser();\r
- _writetopdf_filechooser.addChoosableFileFilter( MainFrame.pdffilter );\r
- _writetographics_filechooser = new JFileChooser();\r
- _writetographics_filechooser.addChoosableFileFilter( MainFrame.graphicsfilefilter );\r
// Msa:\r
_msa_filechooser = new JFileChooser();\r
_msa_filechooser.setName( "Read Multiple Sequence Alignment File" );\r
- _msa_filechooser.setCurrentDirectory( new File( "." ) );\r
_msa_filechooser.setMultiSelectionEnabled( false );\r
_msa_filechooser.addChoosableFileFilter( _msa_filechooser.getAcceptAllFileFilter() );\r
_msa_filechooser.addChoosableFileFilter( MainFrame.msafilter );\r
// Seqs:\r
_seqs_pi_filechooser = new JFileChooser();\r
_seqs_pi_filechooser.setName( "Read Sequences File" );\r
- _seqs_pi_filechooser.setCurrentDirectory( new File( "." ) );\r
_seqs_pi_filechooser.setMultiSelectionEnabled( false );\r
_seqs_pi_filechooser.addChoosableFileFilter( _seqs_pi_filechooser.getAcceptAllFileFilter() );\r
_seqs_pi_filechooser.addChoosableFileFilter( MainFrame.seqsfilter );\r
// Expression\r
_values_filechooser = new JFileChooser();\r
- _values_filechooser.setCurrentDirectory( new File( "." ) );\r
_values_filechooser.setMultiSelectionEnabled( false );\r
// Sequences\r
_sequences_filechooser = new JFileChooser();\r
- _sequences_filechooser.setCurrentDirectory( new File( "." ) );\r
_sequences_filechooser.setMultiSelectionEnabled( false );\r
+ try {\r
+ final String home_dir = System.getProperty( "user.home" );\r
+ _open_filechooser.setCurrentDirectory( new File( home_dir ) );\r
+ _open_filechooser_for_species_tree.setCurrentDirectory( new File( home_dir ) );\r
+ _msa_filechooser.setCurrentDirectory( new File( home_dir ) );\r
+ _seqs_pi_filechooser.setCurrentDirectory( new File( home_dir ) );\r
+ _values_filechooser.setCurrentDirectory( new File( home_dir ) );\r
+ _sequences_filechooser.setCurrentDirectory( new File( home_dir ) );\r
+ }\r
+ catch ( final Exception e ) {\r
+ e.printStackTrace();\r
+ // Do nothing. Not important.\r
+ }\r
// build the menu bar\r
_jmenubar = new JMenuBar();\r
if ( !_configuration.isUseNativeUI() ) {\r
_jmenubar.setBackground( getConfiguration().getGuiMenuBackgroundColor() );\r
}\r
buildFileMenu();\r
- if ( Constants.__ALLOW_PHYLOGENETIC_INFERENCE ) {\r
+ if ( AptxConstants.__ALLOW_PHYLOGENETIC_INFERENCE ) {\r
buildPhylogeneticInferenceMenu();\r
}\r
buildAnalysisMenu();\r
public void componentResized( final ComponentEvent e ) {\r
if ( _mainpanel.getCurrentTreePanel() != null ) {\r
_mainpanel.getCurrentTreePanel().calcParametersForPainting( _mainpanel.getCurrentTreePanel()\r
- .getWidth(),\r
+ .getWidth(),\r
_mainpanel.getCurrentTreePanel()\r
- .getHeight() );\r
+ .getHeight() );\r
}\r
}\r
} );\r
else if ( o == _load_species_tree_item ) {\r
readSpeciesTreeFromFile();\r
}\r
- else if ( o == _lineage_inference ) {\r
- if ( isSubtreeDisplayed() ) {\r
- JOptionPane.showMessageDialog( this,\r
- "Subtree is shown.",\r
- "Cannot infer ancestral taxonomies",\r
- JOptionPane.ERROR_MESSAGE );\r
- return;\r
- }\r
- executeLineageInference();\r
- }\r
else if ( o == _obtain_detailed_taxonomic_information_jmi ) {\r
if ( isSubtreeDisplayed() ) {\r
return;\r
JOptionPane.showMessageDialog( this,\r
"Table contains " + t.getNumberOfRows() + " rows, but tree contains "\r
+ phy.getNumberOfExternalNodes() + " external nodes",\r
- "Warning",\r
- JOptionPane.WARNING_MESSAGE );\r
+ "Warning",\r
+ JOptionPane.WARNING_MESSAGE );\r
}\r
final DescriptiveStatistics stats = new BasicDescriptiveStatistics();\r
int not_found = 0;\r
}\r
catch ( final IllegalArgumentException e ) {\r
JOptionPane\r
- .showMessageDialog( this,\r
- e.getMessage(),\r
- "Error Mapping Node Identifiers to Expression Value Identifiers",\r
- JOptionPane.ERROR_MESSAGE );\r
+ .showMessageDialog( this,\r
+ e.getMessage(),\r
+ "Error Mapping Node Identifiers to Expression Value Identifiers",\r
+ JOptionPane.ERROR_MESSAGE );\r
return;\r
}\r
if ( row < 0 ) {\r
catch ( final NumberFormatException e ) {\r
JOptionPane.showMessageDialog( this,\r
"Could not parse \"" + t.getValueAsString( col, row )\r
- + "\" into a decimal value",\r
+ + "\" into a decimal value",\r
"Issue with Expression Value Table",\r
JOptionPane.ERROR_MESSAGE );\r
return;\r
if ( !l.isEmpty() ) {\r
if ( node.getNodeData().getProperties() != null ) {\r
node.getNodeData().getProperties()\r
- .removePropertiesWithGivenReferencePrefix( PhyloXmlUtil.VECTOR_PROPERTY_REF );\r
+ .removePropertiesWithGivenReferencePrefix( PhyloXmlUtil.VECTOR_PROPERTY_REF );\r
}\r
node.getNodeData().setVector( l );\r
}\r
}\r
if ( not_found > 0 ) {\r
JOptionPane.showMessageDialog( this, "Could not fine expression values for " + not_found\r
- + " external node(s)", "Warning", JOptionPane.WARNING_MESSAGE );\r
+ + " external node(s)", "Warning", JOptionPane.WARNING_MESSAGE );\r
}\r
getCurrentTreePanel().setStatisticsForExpressionValues( stats );\r
}\r
}\r
if ( nodes.size() > 1 ) {\r
JOptionPane.showMessageDialog( this, "Split sequence name \"" + seq_name_split\r
- + "\" is not unique", "Sequence name not unique", JOptionPane.ERROR_MESSAGE );\r
+ + "\" is not unique", "Sequence name not unique", JOptionPane.ERROR_MESSAGE );\r
setArrowCursor();\r
return;\r
}\r
}\r
else {\r
JOptionPane.showMessageDialog( this, "Attached " + attached_counter\r
- + " sequences out of a total of " + total_counter + " sequences.\n" + s, attached_counter\r
- + " sequences attached", JOptionPane.WARNING_MESSAGE );\r
+ + " sequences out of a total of " + total_counter + " sequences.\n" + s, attached_counter\r
+ + " sequences attached", JOptionPane.WARNING_MESSAGE );\r
}\r
}\r
else {\r
JOptionPane.showMessageDialog( this, "No maching tree node for any of the " + total_counter\r
- + " sequences", "Could not attach any sequences", JOptionPane.ERROR_MESSAGE );\r
+ + " sequences", "Could not attach any sequences", JOptionPane.ERROR_MESSAGE );\r
}\r
}\r
}\r
}\r
if ( to_be_removed.size() > 0 ) {\r
JOptionPane.showMessageDialog( this, "Collapsed " + to_be_removed.size()\r
- + " branches with\nconfidence values below " + getMinNotCollapseConfidenceValue(), "Collapsed "\r
- + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );\r
+ + " branches with\nconfidence values below " + getMinNotCollapseConfidenceValue(), "Collapsed "\r
+ + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );\r
}\r
else {\r
JOptionPane.showMessageDialog( this, "No branch collapsed,\nminimum confidence value per branch is "\r
}\r
if ( to_be_removed.size() > 0 ) {\r
JOptionPane.showMessageDialog( this, "Collapsed " + to_be_removed.size()\r
- + " branches with\nbranch length values below " + getMinNotCollapseBlValue(), "Collapsed "\r
- + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );\r
+ + " branches with\nbranch length values below " + getMinNotCollapseBlValue(), "Collapsed "\r
+ + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );\r
}\r
else {\r
JOptionPane.showMessageDialog( this,\r
if ( getMsa() != null ) {\r
final PhylogeneticInferrer inferrer = new PhylogeneticInferrer( getMsa(),\r
getPhylogeneticInferenceOptions()\r
- .copy(), this );\r
+ .copy(), this );\r
new Thread( inferrer ).start();\r
}\r
else {\r
if ( getSeqs() != null ) {\r
final PhylogeneticInferrer inferrer = new PhylogeneticInferrer( getSeqs(),\r
getPhylogeneticInferenceOptions()\r
- .copy(), this );\r
+ .copy(), this );\r
new Thread( inferrer ).start();\r
}\r
else {\r
}\r
JOptionPane.showMessageDialog( this,\r
"Extracted taxonomic data from " + all + counter\r
- + " named external nodes:\n" + sb.toString() + failed,\r
+ + " named external nodes:\n" + sb.toString() + failed,\r
"Taxonomic Data Extraction Completed",\r
counter_failed > 0 ? JOptionPane.WARNING_MESSAGE\r
: JOptionPane.INFORMATION_MESSAGE );\r
}\r
else {\r
JOptionPane\r
- .showMessageDialog( this,\r
- "Could not extract any taxonomic data.\nMaybe node names are empty\n"\r
- + "or not in the forms \"XYZ_CAEEL\", \"XYZ_6239\", or \"XYZ_Caenorhabditis_elegans\"\n"\r
- + "or nodes already have taxonomic data?\n",\r
+ .showMessageDialog( this,\r
+ "Could not extract any taxonomic data.\nMaybe node names are empty\n"\r
+ + "or not in the forms \"XYZ_CAEEL\", \"XYZ_6239\", or \"XYZ_Caenorhabditis_elegans\"\n"\r
+ + "or nodes already have taxonomic data?\n",\r
"No Taxonomic Data Extracted",\r
JOptionPane.ERROR_MESSAGE );\r
}\r
final Phylogeny phy = getCurrentTreePanel().getPhylogeny();\r
if ( ( phy != null ) && !phy.isEmpty() ) {\r
PhylogenyMethods\r
- .transferNodeNameToField( phy, PhylogenyMethods.PhylogenyNodeField.SEQUENCE_NAME, false );\r
+ .transferNodeNameToField( phy, PhylogenyMethods.PhylogenyNodeField.SEQUENCE_NAME, false );\r
}\r
}\r
}\r
if ( getMainPanel().getMainFrame() == null ) {\r
// Must be "E" applet version.\r
( ( ArchaeopteryxE ) ( ( MainPanelApplets ) getMainPanel() ).getApplet() )\r
- .setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );\r
+ .setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );\r
}\r
else {\r
getMainPanel().getMainFrame().setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );\r
Phylogeny[] phys = null;\r
// Set an initial directory if none set yet\r
final File my_dir = getCurrentDir();\r
- _open_filechooser.setMultiSelectionEnabled( true );\r
// Open file-open dialog and set current directory\r
if ( my_dir != null ) {\r
_open_filechooser.setCurrentDirectory( my_dir );\r
try {\r
final PhylogenyParser parser = ParserUtils\r
.createParserDependingOnFileType( file, getConfiguration()\r
- .isValidatePhyloXmlAgainstSchema() );\r
+ .isValidatePhyloXmlAgainstSchema() );\r
if ( parser instanceof NexusPhylogeniesParser ) {\r
final NexusPhylogeniesParser nex = ( NexusPhylogeniesParser ) parser;\r
setSpecialOptionsForNexParser( nex );\r
_mainpanel.getControlPanel().showWhole();\r
if ( nhx_or_nexus && one_desc ) {\r
JOptionPane\r
- .showMessageDialog( this,\r
- "One or more trees contain (a) node(s) with one descendant, "\r
- + ForesterUtil.LINE_SEPARATOR\r
- + "possibly indicating illegal parentheses within node names.",\r
+ .showMessageDialog( this,\r
+ "One or more trees contain (a) node(s) with one descendant, "\r
+ + ForesterUtil.LINE_SEPARATOR\r
+ + "possibly indicating illegal parentheses within node names.",\r
"Warning: Possible Error in New Hampshire Formatted Data",\r
JOptionPane.WARNING_MESSAGE );\r
}\r
if ( _open_filechooser_for_species_tree.getFileFilter() == MainFrame.xmlfilter ) {\r
try {\r
final Phylogeny[] trees = PhylogenyMethods.readPhylogenies( PhyloXmlParser\r
- .createPhyloXmlParserXsdValidating(), file );\r
+ .createPhyloXmlParserXsdValidating(), file );\r
t = trees[ 0 ];\r
}\r
catch ( final Exception e ) {\r
else {\r
try {\r
final Phylogeny[] trees = PhylogenyMethods.readPhylogenies( PhyloXmlParser\r
- .createPhyloXmlParserXsdValidating(), file );\r
+ .createPhyloXmlParserXsdValidating(), file );\r
t = trees[ 0 ];\r
}\r
catch ( final Exception e ) {\r
exception = true;\r
t = null;\r
JOptionPane\r
- .showMessageDialog( this,\r
- "Species tree contains external node(s) without taxonomy information",\r
- "Species tree not loaded",\r
- JOptionPane.ERROR_MESSAGE );\r
+ .showMessageDialog( this,\r
+ "Species tree contains external node(s) without taxonomy information",\r
+ "Species tree not loaded",\r
+ JOptionPane.ERROR_MESSAGE );\r
break;\r
}\r
else {\r
"Taxonomy ["\r
+ node.getNodeData().getTaxonomy().asSimpleText()\r
+ "] is not unique in species tree",\r
- "Species tree not loaded",\r
- JOptionPane.ERROR_MESSAGE );\r
+ "Species tree not loaded",\r
+ JOptionPane.ERROR_MESSAGE );\r
break;\r
}\r
else {\r
_file_jmenu.addSeparator();\r
final WebservicesManager webservices_manager = WebservicesManager.getInstance();\r
_load_phylogeny_from_webservice_menu_items = new JMenuItem[ webservices_manager\r
- .getAvailablePhylogeniesWebserviceClients().size() ];\r
+ .getAvailablePhylogeniesWebserviceClients().size() ];\r
for( int i = 0; i < webservices_manager.getAvailablePhylogeniesWebserviceClients().size(); ++i ) {\r
final PhylogeniesWebserviceClient client = webservices_manager.getAvailablePhylogeniesWebserviceClient( i );\r
_load_phylogeny_from_webservice_menu_items[ i ] = new JMenuItem( client.getMenuName() );\r
_file_jmenu.add( _exit_item = new JMenuItem( "Exit" ) );\r
customizeJMenuItem( _open_item );\r
_open_item\r
- .setFont( new Font( _open_item.getFont().getFontName(), Font.BOLD, _open_item.getFont().getSize() + 4 ) );\r
+ .setFont( new Font( _open_item.getFont().getFontName(), Font.BOLD, _open_item.getFont().getSize() + 4 ) );\r
customizeJMenuItem( _open_url_item );\r
for( int i = 0; i < webservices_manager.getAvailablePhylogeniesWebserviceClients().size(); ++i ) {\r
customizeJMenuItem( _load_phylogeny_from_webservice_menu_items[ i ] );\r
MainFrame.setOvPlacementColorChooseMenuItem( _overview_placment_mi, getOptions() );\r
MainFrame.setTextColorChooseMenuItem( _switch_colors_mi, getCurrentTreePanel() );\r
MainFrame\r
- .setTextMinSupportMenuItem( _choose_minimal_confidence_mi, getOptions(), getCurrentTreePanel() );\r
+ .setTextMinSupportMenuItem( _choose_minimal_confidence_mi, getOptions(), getCurrentTreePanel() );\r
MainFrame.setTextForFontChooserMenuItem( _choose_font_mi, MainFrame\r
- .createCurrentFontDesc( getMainPanel().getTreeFontSet() ) );\r
+ .createCurrentFontDesc( getMainPanel().getTreeFontSet() ) );\r
MainFrame.setTextForGraphicsSizeChooserMenuItem( _print_size_mi, getOptions() );\r
MainFrame.setTextForPdfLineWidthChooserMenuItem( _choose_pdf_width_mi, getOptions() );\r
MainFrame.setCycleNodeFillMenuItem( _cycle_node_fill_mi, getOptions() );\r
} );\r
_options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( DISPLAY_SUBHEADER ), getConfiguration() ) );\r
_options_jmenu\r
- .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );\r
+ .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );\r
_options_jmenu.add( _uniform_cladograms_rbmi = new JRadioButtonMenuItem( MainFrame.UNIFORM_CLADOGRAMS_LABEL ) );\r
_options_jmenu.add( _non_lined_up_cladograms_rbmi = new JRadioButtonMenuItem( NON_LINED_UP_CLADOGRAMS_LABEL ) );\r
_radio_group_1 = new ButtonGroup();\r
_options_jmenu.add( _show_overview_cbmi = new JCheckBoxMenuItem( SHOW_OVERVIEW_LABEL ) );\r
_options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( DISPLAY_SCALE_LABEL ) );\r
_options_jmenu\r
- .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) );\r
+ .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) );\r
_options_jmenu\r
- .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) );\r
+ .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) );\r
_options_jmenu\r
- .add( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );\r
+ .add( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );\r
_options_jmenu.add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );\r
if ( getConfiguration().doDisplayOption( Configuration.show_domain_architectures ) ) {\r
_options_jmenu.add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );\r
_options_jmenu.add( _search_with_regex_cbmi = new JCheckBoxMenuItem( MainFrame.SEARCH_REGEX_LABEL ) );\r
_search_with_regex_cbmi.setToolTipText( MainFrame.SEARCH_WITH_REGEX_TIP );\r
_options_jmenu.add( _inverse_search_result_cbmi = new JCheckBoxMenuItem( INVERSE_SEARCH_RESULT_LABEL ) );\r
+ _options_jmenu.add( _color_all_found_nodes_when_coloring_subtree_cbmi = new JCheckBoxMenuItem( "Colorize All Found Nodes When Colorizing Subtree(s)" ) ); \r
_options_jmenu.addSeparator();\r
_options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Graphics Export & Printing:" ),\r
getConfiguration() ) );\r
_options_jmenu.add( _antialias_print_cbmi = new JCheckBoxMenuItem( "Antialias" ) );\r
_options_jmenu.add( _print_black_and_white_cbmi = new JCheckBoxMenuItem( "Export in Black and White" ) );\r
_options_jmenu\r
- .add( _print_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PDF export and Printing" ) );\r
+ .add( _print_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PDF export and Printing" ) );\r
_options_jmenu\r
- .add( _graphics_export_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PNG, JPG, and GIF export" ) );\r
+ .add( _graphics_export_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PNG, JPG, and GIF export" ) );\r
_options_jmenu\r
- .add( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );\r
+ .add( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );\r
_options_jmenu.add( _print_size_mi = new JMenuItem( "" ) );\r
_options_jmenu.add( _choose_pdf_width_mi = new JMenuItem( "" ) );\r
_options_jmenu.addSeparator();\r
- _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/NHX/Nexus Input:" ), getConfiguration() ) );\r
+ _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/NHX/Nexus Read:" ), getConfiguration() ) );\r
_options_jmenu\r
- .add( _internal_number_are_confidence_for_nh_parsing_cbmi = new JCheckBoxMenuItem( "Internal Node Names are Confidence Values" ) );\r
+ .add( _internal_number_are_confidence_for_nh_parsing_cbmi = new JCheckBoxMenuItem( "Internal Node Names are Confidence Values" ) );\r
_options_jmenu.add( _replace_underscores_cbmi = new JCheckBoxMenuItem( "Replace Underscores with Spaces" ) );\r
_options_jmenu\r
- .add( _allow_errors_in_distance_to_parent_cbmi = new JCheckBoxMenuItem( "Ignore Distance Values Format Errors" ) );\r
+ .add( _allow_errors_in_distance_to_parent_cbmi = new JCheckBoxMenuItem( "Ignore Distance Values Format Errors" ) );\r
_options_jmenu.add( _extract_taxonomy_no_rbmi = new JRadioButtonMenuItem( "No Taxonomy Extraction" ) );\r
_options_jmenu\r
- .add( _extract_taxonomy_pfam_strict_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style Node Names" ) );\r
+ .add( _extract_taxonomy_pfam_strict_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style Node Names" ) );\r
_options_jmenu\r
- .add( _extract_taxonomy_pfam_relaxed_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style like Node Names" ) );\r
+ .add( _extract_taxonomy_pfam_relaxed_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style like Node Names" ) );\r
_options_jmenu\r
- .add( _extract_taxonomy_agressive_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids/Scientific Names from Node Names" ) );\r
+ .add( _extract_taxonomy_agressive_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids/Scientific Names from Node Names" ) );\r
_extract_taxonomy_pfam_strict_rbmi\r
- .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"BCL2_MOUSE/123-304\" or \"BCL2_10090/123-304\"" );\r
+ .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"BCL2_MOUSE/123-304\" or \"BCL2_10090/123-304\"" );\r
_extract_taxonomy_pfam_relaxed_rbmi\r
- .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"bax_MOUSE\" or \"bax_10090\"" );\r
+ .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"bax_MOUSE\" or \"bax_10090\"" );\r
_extract_taxonomy_agressive_rbmi\r
- .setToolTipText( "To extract taxonomy codes/ids or scientific names from node names in the form of e.g. \"MOUSE\" or \"10090\" or \"xyz_Nematostella_vectensis\"" );\r
+ .setToolTipText( "To extract taxonomy codes/ids or scientific names from node names in the form of e.g. \"MOUSE\" or \"10090\" or \"xyz_Nematostella_vectensis\"" );\r
_radio_group_2 = new ButtonGroup();\r
_radio_group_2.add( _extract_taxonomy_no_rbmi );\r
_radio_group_2.add( _extract_taxonomy_pfam_strict_rbmi );\r
_radio_group_2.add( _extract_taxonomy_pfam_relaxed_rbmi );\r
_radio_group_2.add( _extract_taxonomy_agressive_rbmi );\r
- _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/Nexus Output:" ), getConfiguration() ) );\r
+ _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/Nexus Save:" ), getConfiguration() ) );\r
_options_jmenu\r
- .add( _use_brackets_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_BRACKETS_FOR_CONF_IN_NH_LABEL ) );\r
+ .add( _use_brackets_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_BRACKETS_FOR_CONF_IN_NH_LABEL ) );\r
_use_brackets_for_conf_in_nh_export_cbmi\r
- .setToolTipText( "e.g. \"0.1[90]\" for a branch with support 90 and a length of 0.1" );\r
+ .setToolTipText( "e.g. \"0.1[90]\" for a branch with support 90 and a length of 0.1" );\r
_options_jmenu\r
- .add( _use_internal_names_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL ) );\r
+ .add( _use_internal_names_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL ) );\r
customizeJMenuItem( _choose_font_mi );\r
customizeJMenuItem( _choose_minimal_confidence_mi );\r
customizeJMenuItem( _switch_colors_mi );\r
customizeJMenuItem( _choose_pdf_width_mi );\r
customizeJMenuItem( _overview_placment_mi );\r
customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi, getOptions()\r
- .isShowDefaultNodeShapesExternal() );\r
+ .isShowDefaultNodeShapesExternal() );\r
customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi, getOptions()\r
- .isShowDefaultNodeShapesInternal() );\r
+ .isShowDefaultNodeShapesInternal() );\r
customizeCheckBoxMenuItem( _show_default_node_shapes_for_marked_cbmi, getOptions()\r
- .isShowDefaultNodeShapesForMarkedNodes() );\r
+ .isShowDefaultNodeShapesForMarkedNodes() );\r
customizeJMenuItem( _cycle_node_shape_mi );\r
customizeJMenuItem( _cycle_node_fill_mi );\r
customizeJMenuItem( _choose_node_size_mi );\r
customizeCheckBoxMenuItem( _antialias_print_cbmi, getOptions().isAntialiasPrint() );\r
customizeCheckBoxMenuItem( _print_black_and_white_cbmi, getOptions().isPrintBlackAndWhite() );\r
customizeCheckBoxMenuItem( _internal_number_are_confidence_for_nh_parsing_cbmi, getOptions()\r
- .isInternalNumberAreConfidenceForNhParsing() );\r
+ .isInternalNumberAreConfidenceForNhParsing() );\r
customizeRadioButtonMenuItem( _extract_taxonomy_no_rbmi,\r
getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.NO );\r
customizeRadioButtonMenuItem( _extract_taxonomy_pfam_strict_rbmi,\r
getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.AGGRESSIVE );\r
customizeCheckBoxMenuItem( _replace_underscores_cbmi, getOptions().isReplaceUnderscoresInNhParsing() );\r
customizeCheckBoxMenuItem( _allow_errors_in_distance_to_parent_cbmi, getOptions()\r
- .isReplaceUnderscoresInNhParsing() );\r
+ .isReplaceUnderscoresInNhParsing() );\r
customizeCheckBoxMenuItem( _search_with_regex_cbmi, getOptions().isSearchWithRegex() );\r
customizeCheckBoxMenuItem( _search_whole_words_only_cbmi, getOptions().isMatchWholeTermsOnly() );\r
customizeCheckBoxMenuItem( _inverse_search_result_cbmi, getOptions().isInverseSearchResult() );\r
+ customizeCheckBoxMenuItem( _color_all_found_nodes_when_coloring_subtree_cbmi, getOptions().isColorAllFoundNodesWhenColoringSubtree() ); \r
customizeCheckBoxMenuItem( _graphics_export_visible_only_cbmi, getOptions().isGraphicsExportVisibleOnly() );\r
customizeCheckBoxMenuItem( _print_using_actual_size_cbmi, getOptions().isPrintUsingActualSize() );\r
customizeCheckBoxMenuItem( _graphics_export_using_actual_size_cbmi, getOptions()\r
- .isGraphicsExportUsingActualSize() );\r
+ .isGraphicsExportUsingActualSize() );\r
customizeCheckBoxMenuItem( _show_confidence_stddev_cbmi, getOptions().isShowConfidenceStddev() );\r
customizeCheckBoxMenuItem( _use_brackets_for_conf_in_nh_export_cbmi, getOptions()\r
- .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );\r
+ .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );\r
customizeCheckBoxMenuItem( _use_internal_names_for_conf_in_nh_export_cbmi, getOptions()\r
- .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );\r
+ .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );\r
customizeCheckBoxMenuItem( _line_up_renderable_data_cbmi, getOptions().isLineUpRendarableNodeData() );\r
customizeCheckBoxMenuItem( _right_line_up_domains_cbmi, getOptions().isRightLineUpDomains() );\r
_jmenubar.add( _options_jmenu );\r
_inference_menu.add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences..." ) );\r
customizeJMenuItem( _inference_from_seqs_item );\r
_inference_from_seqs_item\r
- .setToolTipText( "Basic phylogenetic inference including multiple sequence alignment" );\r
+ .setToolTipText( "Basic phylogenetic inference including multiple sequence alignment" );\r
}\r
else {\r
_inference_menu\r
- .add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences (no program found)" ) );\r
+ .add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences (no program found)" ) );\r
customizeJMenuItem( _inference_from_seqs_item );\r
_inference_from_seqs_item.setEnabled( false );\r
}\r
_tools_menu.addSeparator();\r
_tools_menu.add( _remove_visual_styles_item = new JMenuItem( "Delete All Visual Styles From Nodes" ) );\r
_remove_visual_styles_item\r
- .setToolTipText( "To remove all node visual styles (fonts, colors) from the current phylogeny" );\r
+ .setToolTipText( "To remove all node visual styles (fonts, colors) from the current phylogeny" );\r
customizeJMenuItem( _remove_visual_styles_item );\r
_tools_menu.add( _remove_branch_color_item = new JMenuItem( "Delete All Colors From Branches" ) );\r
_remove_branch_color_item.setToolTipText( "To remove all branch color values from the current phylogeny" );\r
customizeJMenuItem( _collapse_species_specific_subtrees );\r
_collapse_species_specific_subtrees.setToolTipText( "To (reversibly) collapse species-specific subtrees" );\r
_tools_menu\r
- .add( _collapse_below_threshold = new JMenuItem( "Collapse Branches with Confidence Below Threshold into Multifurcations" ) );\r
+ .add( _collapse_below_threshold = new JMenuItem( "Collapse Branches with Confidence Below Threshold into Multifurcations" ) );\r
customizeJMenuItem( _collapse_below_threshold );\r
_collapse_below_threshold\r
- .setToolTipText( "To (permanently) collapse branches with confidence values below a threshold into multifurcations (in the case of multiple confidences per branch: without at least one confidence value above a threshold)" );\r
+ .setToolTipText( "To (permanently) collapse branches with confidence values below a threshold into multifurcations (in the case of multiple confidences per branch: without at least one confidence value above a threshold)" );\r
//\r
_tools_menu\r
- .add( _collapse_below_branch_length = new JMenuItem( "Collapse Branches with Branch Lengths Below Threshold into Multifurcations" ) );\r
+ .add( _collapse_below_branch_length = new JMenuItem( "Collapse Branches with Branch Lengths Below Threshold into Multifurcations" ) );\r
customizeJMenuItem( _collapse_below_branch_length );\r
_collapse_below_branch_length\r
- .setToolTipText( "To (permanently) collapse branches with branches with branch lengths below a threshold into multifurcations" );\r
+ .setToolTipText( "To (permanently) collapse branches with branches with branch lengths below a threshold into multifurcations" );\r
//\r
_tools_menu.addSeparator();\r
_tools_menu\r
- .add( _extract_tax_code_from_node_names_jmi = new JMenuItem( "Extract Taxonomic Data from Node Names" ) );\r
+ .add( _extract_tax_code_from_node_names_jmi = new JMenuItem( "Extract Taxonomic Data from Node Names" ) );\r
customizeJMenuItem( _extract_tax_code_from_node_names_jmi );\r
_extract_tax_code_from_node_names_jmi\r
- .setToolTipText( "To extract SwissProt/Uniprot taxonomic codes (mnemonics) from nodes names in the form of 'xyz_CAEEL', Uniprot/NCBI identifiers form of 'xyz_6239', or scientific names form of 'xyz_Caenorhabditis_elegans'" );\r
+ .setToolTipText( "To extract SwissProt/Uniprot taxonomic codes (mnemonics) from nodes names in the form of 'xyz_CAEEL', Uniprot/NCBI identifiers form of 'xyz_6239', or scientific names form of 'xyz_Caenorhabditis_elegans'" );\r
_tools_menu\r
- .add( _move_node_names_to_tax_sn_jmi = new JMenuItem( "Transfer Node Names to Taxonomic Scientific Names" ) );\r
+ .add( _move_node_names_to_tax_sn_jmi = new JMenuItem( "Transfer Node Names to Taxonomic Scientific Names" ) );\r
customizeJMenuItem( _move_node_names_to_tax_sn_jmi );\r
_move_node_names_to_tax_sn_jmi.setToolTipText( "To interpret node names as taxonomic scientific names" );\r
_tools_menu.add( _move_node_names_to_seq_names_jmi = new JMenuItem( "Transfer Node Names to Sequence Names" ) );\r
customizeJMenuItem( _obtain_seq_information_jmi );\r
_obtain_seq_information_jmi.setToolTipText( "To add additional sequence information" );\r
_tools_menu\r
- .add( _obtain_detailed_taxonomic_information_jmi = new JMenuItem( OBTAIN_DETAILED_TAXONOMIC_INFORMATION ) );\r
+ .add( _obtain_detailed_taxonomic_information_jmi = new JMenuItem( OBTAIN_DETAILED_TAXONOMIC_INFORMATION ) );\r
customizeJMenuItem( _obtain_detailed_taxonomic_information_jmi );\r
_obtain_detailed_taxonomic_information_jmi\r
- .setToolTipText( "To add additional taxonomic information (from UniProt Taxonomy)" );\r
+ .setToolTipText( "To add additional taxonomic information (from UniProt Taxonomy)" );\r
_tools_menu\r
- .add( _obtain_detailed_taxonomic_information_deleting_jmi = new JMenuItem( "Obtain Detailed Taxonomic Information (deletes nodes!)" ) );\r
+ .add( _obtain_detailed_taxonomic_information_deleting_jmi = new JMenuItem( "Obtain Detailed Taxonomic Information (deletes nodes!)" ) );\r
customizeJMenuItem( _obtain_detailed_taxonomic_information_deleting_jmi );\r
_obtain_detailed_taxonomic_information_deleting_jmi\r
- .setToolTipText( "To add additional taxonomic information, deletes nodes for which taxonomy cannot found (from UniProt Taxonomy)" );\r
+ .setToolTipText( "To add additional taxonomic information, deletes nodes for which taxonomy cannot found (from UniProt Taxonomy)" );\r
_tools_menu.addSeparator();\r
_tools_menu.add( _read_values_jmi = new JMenuItem( "Attach Vector/Expression Values" ) );\r
customizeJMenuItem( _read_values_jmi );\r
_tools_menu.add( _read_seqs_jmi = new JMenuItem( "Attach Molecular Sequences" ) );\r
customizeJMenuItem( _read_seqs_jmi );\r
_read_seqs_jmi\r
- .setToolTipText( "To attach molecular sequences to tree nodes (from Fasta-formatted file) (beta)" );\r
+ .setToolTipText( "To attach molecular sequences to tree nodes (from Fasta-formatted file) (beta)" );\r
_jmenubar.add( _tools_menu );\r
}\r
\r
exit();\r
}\r
\r
- void executeLineageInference() {\r
- if ( ( _mainpanel.getCurrentPhylogeny() == null ) || ( _mainpanel.getCurrentPhylogeny().isEmpty() ) ) {\r
- return;\r
- }\r
- if ( !_mainpanel.getCurrentPhylogeny().isRooted() ) {\r
- JOptionPane.showMessageDialog( this,\r
- "Phylogeny is not rooted.",\r
- "Cannot infer ancestral taxonomies",\r
- JOptionPane.ERROR_MESSAGE );\r
- return;\r
- }\r
- final AncestralTaxonomyInferrer inferrer = new AncestralTaxonomyInferrer( this,\r
- _mainpanel.getCurrentTreePanel(),\r
- _mainpanel.getCurrentPhylogeny()\r
- .copy() );\r
- new Thread( inferrer ).start();\r
- }\r
-\r
void exit() {\r
removeAllTextFrames();\r
_mainpanel.terminate();\r
}\r
else {\r
parser = ParserUtils.createParserDependingOnUrlContents( url, getConfiguration()\r
- .isValidatePhyloXmlAgainstSchema() );\r
+ .isValidatePhyloXmlAgainstSchema() );\r
}\r
if ( parser instanceof NexusPhylogeniesParser ) {\r
nhx_or_nexus = true;\r
JOptionPane.showMessageDialog( this,\r
"Could not read from " + url + "\n"\r
+ ForesterUtil.wordWrap( e.getLocalizedMessage(), 80 ),\r
- "Failed to read URL",\r
- JOptionPane.ERROR_MESSAGE );\r
+ "Failed to read URL",\r
+ JOptionPane.ERROR_MESSAGE );\r
}\r
catch ( final Exception e ) {\r
JOptionPane.showMessageDialog( this,\r
static void warnIfNotPhyloXmlValidation( final Configuration c ) {\r
if ( !c.isValidatePhyloXmlAgainstSchema() ) {\r
JOptionPane\r
- .showMessageDialog( null,\r
- ForesterUtil\r
- .wordWrap( "phyloXML XSD-based validation is turned off [enable with line 'validate_against_phyloxml_xsd_schem: true' in configuration file]",\r
- 80 ),\r
- "Warning",\r
- JOptionPane.WARNING_MESSAGE );\r
+ .showMessageDialog( null,\r
+ ForesterUtil\r
+ .wordWrap( "phyloXML XSD-based validation is turned off [enable with line 'validate_against_phyloxml_xsd_schem: true' in configuration file]",\r
+ 80 ),\r
+ "Warning",\r
+ JOptionPane.WARNING_MESSAGE );\r
}\r
}\r
} // MainFrameApplication.\r