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.ProcessPool;\r
import org.forester.archaeopteryx.tools.ProcessRunning;\r
final static SequencesFileFilter seqsfilter = new SequencesFileFilter();\r
final static DefaultFilter defaultfilter = new DefaultFilter();\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 APTX_REF_TOOL_TIP = Constants.APTX_REFERENCE;\r
+ static final String PHYLOXML_REF_TOOL_TIP = AptxConstants.PHYLOXML_REFERENCE; //TODO //FIXME\r
+ static final String APTX_REF_TOOL_TIP = AptxConstants.APTX_REFERENCE;\r
private static final long serialVersionUID = 3655000897845508358L;\r
final static Font menu_font = new Font( Configuration.getDefaultFontFamilyName(),\r
Font.PLAIN,\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
+ static final String INFER_ANCESTOR_TAXONOMIES = "Infer Ancestor Taxonomies";\r
+ static final String OBTAIN_DETAILED_TAXONOMIC_INFORMATION = "Obtain Detailed Taxonomic Information";\r
JMenuBar _jmenubar;\r
JMenu _file_jmenu;\r
JMenu _tools_menu;\r
JCheckBoxMenuItem _search_whole_words_only_cbmi;\r
JCheckBoxMenuItem _inverse_search_result_cbmi;\r
JCheckBoxMenuItem _search_with_regex_cbmi;\r
+ JCheckBoxMenuItem _color_all_found_nodes_when_coloring_subtree_cbmi;\r
// type menu:\r
JMenu _type_menu;\r
JCheckBoxMenuItem _rectangular_type_cbmi;\r
JMenuItem _phyloxml_ref_item;\r
JMenuItem _aptx_ref_item;\r
//\r
- JFileChooser _writetopdf_filechooser;\r
File _current_dir;\r
+ JFileChooser _writetopdf_filechooser;\r
JFileChooser _save_filechooser;\r
JFileChooser _writetographics_filechooser;\r
// process menu:\r
JMenu _process_menu;\r
- // Handy pointers to child components:\r
MainPanel _mainpanel;\r
Container _contentpane;\r
final LinkedList<TextFrame> _textframes = new LinkedList<TextFrame>(); ;\r
MainFrame() {\r
_process_pool = ProcessPool.createInstance();\r
_writetopdf_filechooser = new JFileChooser();\r
+ _writetopdf_filechooser.setMultiSelectionEnabled( false );\r
+ _writetopdf_filechooser.addChoosableFileFilter( pdffilter );\r
+ _writetographics_filechooser = new JFileChooser();\r
+ _writetographics_filechooser.setMultiSelectionEnabled( false );\r
+ _writetographics_filechooser.addChoosableFileFilter( graphicsfilefilter );\r
_save_filechooser = new JFileChooser();\r
- _save_filechooser.setCurrentDirectory( new File( "." ) );\r
_save_filechooser.setMultiSelectionEnabled( false );\r
_save_filechooser.setFileFilter( xmlfilter );\r
_save_filechooser.addChoosableFileFilter( nhfilter );\r
_save_filechooser.addChoosableFileFilter( nexusfilter );\r
_save_filechooser.addChoosableFileFilter( _save_filechooser.getAcceptAllFileFilter() );\r
- _writetographics_filechooser = new JFileChooser();\r
- _writetographics_filechooser.addChoosableFileFilter( MainFrame.graphicsfilefilter );\r
+ try {\r
+ final String home_dir = System.getProperty( "user.home" );\r
+ _save_filechooser.setCurrentDirectory( new File( home_dir ) );\r
+ _writetopdf_filechooser.setCurrentDirectory( new File( home_dir ) );\r
+ _writetographics_filechooser.setCurrentDirectory( new File( home_dir ) );\r
+ }\r
+ catch ( final Exception e ) {\r
+ e.printStackTrace();\r
+ // Do nothing. Not important.\r
+ }\r
}\r
\r
/**\r
getMainPanel().getControlPanel().search0();\r
getMainPanel().getControlPanel().search1();\r
}\r
+ else if ( o == _color_all_found_nodes_when_coloring_subtree_cbmi ) {\r
+ updateOptions( getOptions() );\r
+ }\r
else if ( o == _show_scale_cbmi ) {\r
updateOptions( getOptions() );\r
}\r
}\r
else if ( o == _help_item ) {\r
try {\r
- AptxUtil.openWebsite( Constants.APTX_DOC_SITE, is_applet, applet );\r
+ AptxUtil.openWebsite( AptxConstants.APTX_DOC_SITE, is_applet, applet );\r
}\r
catch ( final IOException e1 ) {\r
- ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );\r
+ ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() );\r
}\r
}\r
else if ( o == _website_item ) {\r
try {\r
- AptxUtil.openWebsite( Constants.APTX_WEB_SITE, is_applet, applet );\r
+ AptxUtil.openWebsite( AptxConstants.APTX_WEB_SITE, is_applet, applet );\r
}\r
catch ( final IOException e1 ) {\r
- ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );\r
+ ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() );\r
}\r
}\r
else if ( o == _phyloxml_website_item ) {\r
try {\r
- AptxUtil.openWebsite( Constants.PHYLOXML_WEB_SITE, is_applet, applet );\r
+ AptxUtil.openWebsite( AptxConstants.PHYLOXML_WEB_SITE, is_applet, applet );\r
}\r
catch ( final IOException e1 ) {\r
- ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );\r
+ ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() );\r
}\r
}\r
else if ( o == _aptx_ref_item ) {\r
try {\r
- AptxUtil.openWebsite( Constants.APTX_REFERENCE_URL, is_applet, applet );\r
+ AptxUtil.openWebsite( AptxConstants.APTX_REFERENCE_URL, is_applet, applet );\r
}\r
catch ( final IOException e1 ) {\r
- ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );\r
+ ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() );\r
}\r
}\r
else if ( o == _phyloxml_ref_item ) {\r
try {\r
- AptxUtil.openWebsite( Constants.PHYLOXML_REFERENCE_URL, is_applet, applet );\r
+ AptxUtil.openWebsite( AptxConstants.PHYLOXML_REFERENCE_URL, is_applet, applet );\r
}\r
catch ( final IOException e1 ) {\r
- ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );\r
+ ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() );\r
}\r
}\r
else if ( o == _write_to_pdf_item ) {\r
else if ( o == _choose_pdf_width_mi ) {\r
choosePdfWidth();\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 {\r
if ( _load_phylogeny_from_webservice_menu_items != null ) {\r
for( int i = 0; i < _load_phylogeny_from_webservice_menu_items.length; ++i ) {\r
}\r
if ( ( nodes == null ) || nodes.isEmpty() ) {\r
JOptionPane\r
- .showMessageDialog( this,\r
- "Need to select nodes, either via direct selection or via the \"Search\" function",\r
- "No nodes selected for annotation",\r
- JOptionPane.ERROR_MESSAGE );\r
+ .showMessageDialog( this,\r
+ "Need to select nodes, either via direct selection or via the \"Search\" function",\r
+ "No nodes selected for annotation",\r
+ JOptionPane.ERROR_MESSAGE );\r
return;\r
}\r
final Phylogeny phy = getMainPanel().getCurrentPhylogeny();\r
my_panel,\r
"Enter the sequence annotation(s) for the "\r
+ nodes.size() + " selected nodes",\r
- JOptionPane.OK_CANCEL_OPTION );\r
+ JOptionPane.OK_CANCEL_OPTION );\r
if ( result == JOptionPane.OK_OPTION ) {\r
String ref = ref_field.getText();\r
String desc = desc_filed.getText();\r
for( final PhylogenyNode n : nodes ) {\r
ForesterUtil.ensurePresenceOfSequence( n );\r
final Annotation ann = ForesterUtil.isEmpty( ref ) ? new Annotation()\r
- : new Annotation( ref );\r
+ : new Annotation( ref );\r
if ( !ForesterUtil.isEmpty( desc ) ) {\r
ann.setDesc( desc );\r
}\r
.showInputDialog( this,\r
"Please enter the minimum for confidence values to be displayed.\n"\r
+ "[current value: " + getOptions().getMinConfidenceValue() + "]\n",\r
- "Minimal Confidence Value",\r
- JOptionPane.QUESTION_MESSAGE,\r
- null,\r
- null,\r
- getOptions().getMinConfidenceValue() );\r
+ "Minimal Confidence Value",\r
+ JOptionPane.QUESTION_MESSAGE,\r
+ null,\r
+ null,\r
+ getOptions().getMinConfidenceValue() );\r
if ( !ForesterUtil.isEmpty( s ) ) {\r
boolean success = true;\r
double m = 0.0;\r
}\r
if ( ( nodes == null ) || nodes.isEmpty() ) {\r
JOptionPane\r
- .showMessageDialog( this,\r
- "Need to select external nodes, either via direct selection or via the \"Search\" function",\r
- "No external nodes selected to " + function.toLowerCase(),\r
- JOptionPane.ERROR_MESSAGE );\r
+ .showMessageDialog( this,\r
+ "Need to select external nodes, either via direct selection or via the \"Search\" function",\r
+ "No external nodes selected to " + function.toLowerCase(),\r
+ JOptionPane.ERROR_MESSAGE );\r
return;\r
}\r
final int todo = nodes.size();\r
return;\r
}\r
final int result = JOptionPane.showConfirmDialog( null, function + " " + todo\r
- + " external node(s), from a total of " + ext + " external nodes," + "\nresulting in tree with " + res\r
- + " nodes?", function + " external nodes", JOptionPane.OK_CANCEL_OPTION );\r
+ + " external node(s), from a total of " + ext + " external nodes," + "\nresulting in tree with " + res\r
+ + " nodes?", function + " external nodes", JOptionPane.OK_CANCEL_OPTION );\r
if ( result == JOptionPane.OK_OPTION ) {\r
if ( !delete ) {\r
final List<PhylogenyNode> to_delete = new ArrayList<PhylogenyNode>();\r
"Please enter the default line width for PDF export.\n"\r
+ "[current value: "\r
+ getOptions().getPrintLineWidth() + "]\n",\r
- "Line Width for PDF Export",\r
- JOptionPane.QUESTION_MESSAGE,\r
- null,\r
- null,\r
- getOptions().getPrintLineWidth() );\r
+ "Line Width for PDF Export",\r
+ JOptionPane.QUESTION_MESSAGE,\r
+ null,\r
+ null,\r
+ getOptions().getPrintLineWidth() );\r
if ( !ForesterUtil.isEmpty( s ) ) {\r
boolean success = true;\r
float f = 0.0f;\r
+ "[current values: "\r
+ getOptions().getPrintSizeX() + ", "\r
+ getOptions().getPrintSizeY() + "]\n"\r
- + "[A4: " + Constants.A4_SIZE_X + ", "\r
- + Constants.A4_SIZE_Y + "]\n" + "[US Letter: "\r
- + Constants.US_LETTER_SIZE_X + ", "\r
- + Constants.US_LETTER_SIZE_Y + "]",\r
- "Default Size for Graphics Export",\r
- JOptionPane.QUESTION_MESSAGE,\r
- null,\r
- null,\r
- getOptions().getPrintSizeX() + ", "\r
- + getOptions().getPrintSizeY() );\r
+ + "[A4: " + AptxConstants.A4_SIZE_X + ", "\r
+ + AptxConstants.A4_SIZE_Y + "]\n" + "[US Letter: "\r
+ + AptxConstants.US_LETTER_SIZE_X + ", "\r
+ + AptxConstants.US_LETTER_SIZE_Y + "]",\r
+ "Default Size for Graphics Export",\r
+ JOptionPane.QUESTION_MESSAGE,\r
+ null,\r
+ null,\r
+ getOptions().getPrintSizeX() + ", "\r
+ + getOptions().getPrintSizeY() );\r
if ( !ForesterUtil.isEmpty( s ) && ( s.indexOf( ',' ) > 0 ) ) {\r
boolean success = true;\r
int x = 0;\r
+ gsdi.getStrippedExternalGeneTreeNodes().size() + "\n"\r
+ "Taxonomy linkage based on: " + gsdi.getTaxCompBase() + "\n"\r
+ "Number of polytomies in species tree used: " + poly + "\n",\r
- "GSDI successfully completed",\r
- JOptionPane.WARNING_MESSAGE );\r
+ "GSDI successfully completed",\r
+ JOptionPane.WARNING_MESSAGE );\r
}\r
else {\r
JOptionPane.showMessageDialog( this,\r
+ gsdi.getStrippedExternalGeneTreeNodes().size() + "\n"\r
+ "Taxonomy linkage based on: " + gsdi.getTaxCompBase() + "\n"\r
+ "Number of polytomies in species tree used: " + poly + "\n",\r
- "GSDI successfully completed",\r
- JOptionPane.INFORMATION_MESSAGE );\r
+ "GSDI successfully completed",\r
+ JOptionPane.INFORMATION_MESSAGE );\r
}\r
}\r
\r
+ gsdir.getStrippedExternalGeneTreeNodes().size() + "\n"\r
+ "Taxonomy linkage based on: " + gsdir.getTaxCompBase() + "\n"\r
+ "Number of polytomies in species tree used: " + poly + "\n",\r
- "GSDIR successfully completed",\r
- JOptionPane.WARNING_MESSAGE );\r
+ "GSDIR successfully completed",\r
+ JOptionPane.WARNING_MESSAGE );\r
}\r
else {\r
JOptionPane.showMessageDialog( this,\r
+ gsdir.getStrippedExternalGeneTreeNodes().size() + "\n"\r
+ "Taxonomy linkage based on: " + gsdir.getTaxCompBase() + "\n"\r
+ "Number of polytomies in species tree used: " + poly + "\n",\r
- "GSDIR successfully completed",\r
- JOptionPane.INFORMATION_MESSAGE );\r
+ "GSDIR successfully completed",\r
+ JOptionPane.INFORMATION_MESSAGE );\r
}\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
boolean GAndSDoHaveMoreThanOneSpeciesInComman( final Phylogeny gene_tree ) {\r
if ( ( gene_tree == null ) || gene_tree.isEmpty() ) {\r
JOptionPane.showMessageDialog( this,\r
if ( getCurrentTreePanel() != null ) {\r
if ( getCurrentTreePanel().isCurrentTreeIsSubtree() ) {\r
JOptionPane\r
- .showMessageDialog( this,\r
- "This operation can only be performed on a complete tree, not on the currently displayed sub-tree only.",\r
- "Operation can not be exectuted on a sub-tree",\r
- JOptionPane.WARNING_MESSAGE );\r
+ .showMessageDialog( this,\r
+ "This operation can only be performed on a complete tree, not on the currently displayed sub-tree only.",\r
+ "Operation can not be exectuted on a sub-tree",\r
+ JOptionPane.WARNING_MESSAGE );\r
return true;\r
}\r
}\r
void updateOptions( final Options options ) {\r
options.setAntialiasScreen( ( _screen_antialias_cbmi != null ) && _screen_antialias_cbmi.isSelected() );\r
options.setBackgroundColorGradient( ( _background_gradient_cbmi != null )\r
- && _background_gradient_cbmi.isSelected() );\r
+ && _background_gradient_cbmi.isSelected() );\r
options.setShowDomainLabels( ( _show_domain_labels != null ) && _show_domain_labels.isSelected() );\r
options.setShowAnnotationRefSource( ( _show_annotation_ref_source != null )\r
- && _show_annotation_ref_source.isSelected() );\r
+ && _show_annotation_ref_source.isSelected() );\r
options.setAbbreviateScientificTaxonNames( ( _abbreviate_scientific_names != null )\r
- && _abbreviate_scientific_names.isSelected() );\r
+ && _abbreviate_scientific_names.isSelected() );\r
options.setColorLabelsSameAsParentBranch( ( _color_labels_same_as_parent_branch != null )\r
- && _color_labels_same_as_parent_branch.isSelected() );\r
+ && _color_labels_same_as_parent_branch.isSelected() );\r
options.setShowDefaultNodeShapesInternal( ( _show_default_node_shapes_internal_cbmi != null )\r
- && _show_default_node_shapes_internal_cbmi.isSelected() );\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
+ && _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
+ && _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.setCladogramType( CLADOGRAM_TYPE.EXT_NODE_SUM_DEP );\r
}\r
options.setSearchCaseSensitive( ( _search_case_senstive_cbmi != null )\r
- && _search_case_senstive_cbmi.isSelected() );\r
+ && _search_case_senstive_cbmi.isSelected() );\r
if ( ( _show_scale_cbmi != null ) && _show_scale_cbmi.isEnabled() ) {\r
options.setShowScale( _show_scale_cbmi.isSelected() );\r
}\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
+ && _show_confidence_stddev_cbmi.isSelected() );\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
options.setPrintUsingActualSize( ( _print_using_actual_size_cbmi != null )\r
- && ( _print_using_actual_size_cbmi.isSelected() ) );\r
+ && ( _print_using_actual_size_cbmi.isSelected() ) );\r
options.setGraphicsExportUsingActualSize( ( _graphics_export_using_actual_size_cbmi != null )\r
- && ( _graphics_export_using_actual_size_cbmi.isSelected() ) );\r
+ && ( _graphics_export_using_actual_size_cbmi.isSelected() ) );\r
options.setAntialiasPrint( ( _antialias_print_cbmi != null ) && _antialias_print_cbmi.isSelected() );\r
if ( ( _use_brackets_for_conf_in_nh_export_cbmi != null )\r
&& _use_brackets_for_conf_in_nh_export_cbmi.isSelected() ) {\r
options.setNhConversionSupportValueStyle( NH_CONVERSION_SUPPORT_VALUE_STYLE.NONE );\r
}\r
options.setPrintBlackAndWhite( ( _print_black_and_white_cbmi != null )\r
- && _print_black_and_white_cbmi.isSelected() );\r
+ && _print_black_and_white_cbmi.isSelected() );\r
options.setInternalNumberAreConfidenceForNhParsing( ( _internal_number_are_confidence_for_nh_parsing_cbmi != null )\r
- && _internal_number_are_confidence_for_nh_parsing_cbmi.isSelected() );\r
+ && _internal_number_are_confidence_for_nh_parsing_cbmi.isSelected() );\r
if ( ( _extract_taxonomy_pfam_strict_rbmi != null ) && _extract_taxonomy_pfam_strict_rbmi.isSelected() ) {\r
options.setTaxonomyExtraction( TAXONOMY_EXTRACTION.PFAM_STYLE_STRICT );\r
}\r
options.setTaxonomyExtraction( TAXONOMY_EXTRACTION.NO );\r
}\r
options.setReplaceUnderscoresInNhParsing( ( _replace_underscores_cbmi != null )\r
- && _replace_underscores_cbmi.isSelected() );\r
+ && _replace_underscores_cbmi.isSelected() );\r
options.setAllowErrorsInDistanceToParent( ( _allow_errors_in_distance_to_parent_cbmi != null )\r
- && _allow_errors_in_distance_to_parent_cbmi.isSelected() );\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
+ && _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
+ && _inverse_search_result_cbmi.isSelected() );\r
if ( _graphics_export_visible_only_cbmi != null ) {\r
options.setGraphicsExportVisibleOnly( _graphics_export_visible_only_cbmi.isSelected() );\r
if ( _graphics_export_visible_only_cbmi.isSelected() && ( _graphics_export_using_actual_size_cbmi != null ) ) {\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
+ if ( ( _color_all_found_nodes_when_coloring_subtree_cbmi != null ) && _color_all_found_nodes_when_coloring_subtree_cbmi.isEnabled() ) {\r
+ options.setColorAllFoundNodesWhenColoringSubtree( _color_all_found_nodes_when_coloring_subtree_cbmi.isSelected() );\r
+ }\r
}\r
\r
void updateTypeCheckboxes( final Options options, final Object o ) {\r
title = "\"" + getMainPanel().getCurrentPhylogeny().getName() + "\" in " + title;\r
}\r
showTextFrame( _mainpanel.getCurrentPhylogeny().toNewHampshire( getOptions()\r
- .getNhConversionSupportValueStyle() ),\r
- title );\r
+ .getNhConversionSupportValueStyle() ),\r
+ title );\r
}\r
}\r
\r
* Display the about box.\r
*/\r
static void about() {\r
- final StringBuffer about = new StringBuffer( "Archaeopteryx\nVersion " + Constants.VERSION + "\n" );\r
- about.append( "Copyright (C) 2014 Christian M Zmasek\n" );\r
+ final StringBuffer about = new StringBuffer( "Archaeopteryx\nVersion " + AptxConstants.VERSION + "\n" );\r
+ about.append( "Copyright (C) 2016 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( "Last modified: " + AptxConstants.PRG_DATE + "\n" );\r
about.append( "Based on: " + ForesterUtil.getForesterLibraryInformation() + "\n" );\r
about.append( "phyloXML version : " + ForesterConstants.PHYLO_XML_VERSION + "\n" );\r
about.append( "phyloXML location: " + ForesterConstants.PHYLO_XML_LOCATION + "\n" );\r
about.append( "[free memory: " + free_memory + "MB, total memory: " + total_memory + "MB]\n" );\r
about.append( "[locale: " + Locale.getDefault() + "]\n" );\r
about.append( "References:\n" );\r
- about.append( Constants.PHYLOXML_REFERENCE_SHORT + "\n" );\r
+ about.append( AptxConstants.PHYLOXML_REFERENCE_SHORT + "\n" );\r
about.append( "For more information & download:\n" );\r
- about.append( Constants.APTX_WEB_SITE + "\n" );\r
+ about.append( AptxConstants.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
+ about.append( AptxConstants.APTX_DOC_SITE + "\n" );\r
+ about.append( "Comments: " + AptxConstants.AUTHOR_EMAIL );\r
+ JOptionPane.showMessageDialog( null, about, AptxConstants.PRG_NAME, JOptionPane.PLAIN_MESSAGE );\r
}\r
\r
static void chooseNodeSize( final Options options, final Component parent ) {\r
"Please enter the default size for node shapes.\n"\r
+ "[current value: "\r
+ options.getDefaultNodeShapeSize() + "]\n",\r
- "Node Shape Size",\r
- JOptionPane.QUESTION_MESSAGE,\r
- null,\r
- null,\r
- options.getDefaultNodeShapeSize() );\r
+ "Node Shape Size",\r
+ JOptionPane.QUESTION_MESSAGE,\r
+ null,\r
+ null,\r
+ options.getDefaultNodeShapeSize() );\r
if ( !ForesterUtil.isEmpty( s ) ) {\r
boolean success = true;\r
double m = 0.0;\r
tp.resetPreferredSize();\r
tp.repaint();\r
}\r
- final String job_name = Constants.PRG_NAME;\r
+ final String job_name = AptxConstants.PRG_NAME;\r
boolean error = false;\r
String printer_name = null;\r
try {\r
JOptionPane.showMessageDialog( comp,\r
"There was an unknown problem when attempting to write to PDF file: \""\r
+ file_name + "\"",\r
- "Error",\r
- JOptionPane.ERROR_MESSAGE );\r
+ "Error",\r
+ JOptionPane.ERROR_MESSAGE );\r
}\r
}\r
if ( !opts.isPrintUsingActualSize() ) {\r
static void setTextColorChooseMenuItem( final JMenuItem mi, final TreePanel tree_panel ) {\r
if ( ( tree_panel != null ) && ( tree_panel.getTreeColorSet() != null ) ) {\r
mi.setText( "Select Color Scheme... (current: " + tree_panel.getTreeColorSet().getCurrentColorSchemeName()\r
- + ")" );\r
+ + ")" );\r
}\r
else {\r
mi.setText( "Select Color Scheme..." );\r
JOptionPane.showMessageDialog( comp,\r
"There was an unknown problem when attempting to write to an image file: \""\r
+ file_name + "\"",\r
- "Error",\r
- JOptionPane.ERROR_MESSAGE );\r
+ "Error",\r
+ JOptionPane.ERROR_MESSAGE );\r
}\r
}\r
contentpane.repaint();\r
return null;\r
}\r
else {\r
- final File to = new File( file.getAbsoluteFile().toString() + Constants.BACKUP_FILE_SUFFIX );\r
+ final File to = new File( file.getAbsoluteFile().toString() + AptxConstants.BACKUP_FILE_SUFFIX );\r
try {\r
ForesterUtil.copyFile( file, to );\r
}\r