X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FMainFrame.java;h=4c85a4a28975b5e1e106b0040afba37afdca0825;hb=a9e626aa67ff9cb1649c371f9d705eb04498cc33;hp=0f4ae3e7209f992cda674a26c83855c2327876ca;hpb=df65b1c6181c0474f10763a1d5e6a2e9ab723b87;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index 0f4ae3e..4c85a4a 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -94,8 +94,8 @@ public abstract class MainFrame extends JFrame implements ActionListener { final static SequencesFileFilter seqsfilter = new SequencesFileFilter(); final static DefaultFilter defaultfilter = new DefaultFilter(); static final String USE_MOUSEWHEEL_SHIFT_TO_ROTATE = "In this display type, use mousewheel + Shift to rotate [or A and S]"; - static final String PHYLOXML_REF_TOOL_TIP = Constants.PHYLOXML_REFERENCE; //TODO //FIXME - static final String APTX_REF_TOOL_TIP = Constants.APTX_REFERENCE; + static final String PHYLOXML_REF_TOOL_TIP = AptxConstants.PHYLOXML_REFERENCE; //TODO //FIXME + static final String APTX_REF_TOOL_TIP = AptxConstants.APTX_REFERENCE; private static final long serialVersionUID = 3655000897845508358L; final static Font menu_font = new Font( Configuration.getDefaultFontFamilyName(), Font.PLAIN, @@ -253,6 +253,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { JCheckBoxMenuItem _search_whole_words_only_cbmi; JCheckBoxMenuItem _inverse_search_result_cbmi; JCheckBoxMenuItem _search_with_regex_cbmi; + JCheckBoxMenuItem _color_all_found_nodes_when_coloring_subtree_cbmi; // type menu: JMenu _type_menu; JCheckBoxMenuItem _rectangular_type_cbmi; @@ -534,6 +535,9 @@ public abstract class MainFrame extends JFrame implements ActionListener { getMainPanel().getControlPanel().search0(); getMainPanel().getControlPanel().search1(); } + else if ( o == _color_all_found_nodes_when_coloring_subtree_cbmi ) { + updateOptions( getOptions() ); + } else if ( o == _show_scale_cbmi ) { updateOptions( getOptions() ); } @@ -586,42 +590,42 @@ public abstract class MainFrame extends JFrame implements ActionListener { } else if ( o == _help_item ) { try { - AptxUtil.openWebsite( Constants.APTX_DOC_SITE, is_applet, applet ); + AptxUtil.openWebsite( AptxConstants.APTX_DOC_SITE, is_applet, applet ); } catch ( final IOException e1 ) { - ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() ); + ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() ); } } else if ( o == _website_item ) { try { - AptxUtil.openWebsite( Constants.APTX_WEB_SITE, is_applet, applet ); + AptxUtil.openWebsite( AptxConstants.APTX_WEB_SITE, is_applet, applet ); } catch ( final IOException e1 ) { - ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() ); + ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() ); } } else if ( o == _phyloxml_website_item ) { try { - AptxUtil.openWebsite( Constants.PHYLOXML_WEB_SITE, is_applet, applet ); + AptxUtil.openWebsite( AptxConstants.PHYLOXML_WEB_SITE, is_applet, applet ); } catch ( final IOException e1 ) { - ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() ); + ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() ); } } else if ( o == _aptx_ref_item ) { try { - AptxUtil.openWebsite( Constants.APTX_REFERENCE_URL, is_applet, applet ); + AptxUtil.openWebsite( AptxConstants.APTX_REFERENCE_URL, is_applet, applet ); } catch ( final IOException e1 ) { - ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() ); + ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() ); } } else if ( o == _phyloxml_ref_item ) { try { - AptxUtil.openWebsite( Constants.PHYLOXML_REFERENCE_URL, is_applet, applet ); + AptxUtil.openWebsite( AptxConstants.PHYLOXML_REFERENCE_URL, is_applet, applet ); } catch ( final IOException e1 ) { - ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() ); + ForesterUtil.printErrorMessage( AptxConstants.PRG_NAME, e1.toString() ); } } else if ( o == _write_to_pdf_item ) { @@ -1268,10 +1272,10 @@ public abstract class MainFrame extends JFrame implements ActionListener { + "[current values: " + getOptions().getPrintSizeX() + ", " + getOptions().getPrintSizeY() + "]\n" - + "[A4: " + Constants.A4_SIZE_X + ", " - + Constants.A4_SIZE_Y + "]\n" + "[US Letter: " - + Constants.US_LETTER_SIZE_X + ", " - + Constants.US_LETTER_SIZE_Y + "]", + + "[A4: " + AptxConstants.A4_SIZE_X + ", " + + AptxConstants.A4_SIZE_Y + "]\n" + "[US Letter: " + + AptxConstants.US_LETTER_SIZE_X + ", " + + AptxConstants.US_LETTER_SIZE_Y + "]", "Default Size for Graphics Export", JOptionPane.QUESTION_MESSAGE, null, @@ -1970,6 +1974,9 @@ public abstract class MainFrame extends JFrame implements ActionListener { if ( ( _line_up_renderable_data_cbmi != null ) && _line_up_renderable_data_cbmi.isEnabled() ) { options.setLineUpRendarableNodeData( _line_up_renderable_data_cbmi.isSelected() ); } + if ( ( _color_all_found_nodes_when_coloring_subtree_cbmi != null ) && _color_all_found_nodes_when_coloring_subtree_cbmi.isEnabled() ) { + options.setColorAllFoundNodesWhenColoringSubtree( _color_all_found_nodes_when_coloring_subtree_cbmi.isSelected() ); + } } void updateTypeCheckboxes( final Options options, final Object o ) { @@ -2049,11 +2056,11 @@ public abstract class MainFrame extends JFrame implements ActionListener { * Display the about box. */ static void about() { - final StringBuffer about = new StringBuffer( "Archaeopteryx\nVersion " + Constants.VERSION + "\n" ); - about.append( "Copyright (C) 2015 Christian M Zmasek\n" ); + final StringBuffer about = new StringBuffer( "Archaeopteryx\nVersion " + AptxConstants.VERSION + "\n" ); + about.append( "Copyright (C) 2016 Christian M Zmasek\n" ); about.append( "All Rights Reserved\n" ); about.append( "License: GNU Lesser General Public License (LGPL)\n" ); - about.append( "Last modified: " + Constants.PRG_DATE + "\n" ); + about.append( "Last modified: " + AptxConstants.PRG_DATE + "\n" ); about.append( "Based on: " + ForesterUtil.getForesterLibraryInformation() + "\n" ); about.append( "phyloXML version : " + ForesterConstants.PHYLO_XML_VERSION + "\n" ); about.append( "phyloXML location: " + ForesterConstants.PHYLO_XML_LOCATION + "\n" ); @@ -2071,13 +2078,13 @@ public abstract class MainFrame extends JFrame implements ActionListener { about.append( "[free memory: " + free_memory + "MB, total memory: " + total_memory + "MB]\n" ); about.append( "[locale: " + Locale.getDefault() + "]\n" ); about.append( "References:\n" ); - about.append( Constants.PHYLOXML_REFERENCE_SHORT + "\n" ); + about.append( AptxConstants.PHYLOXML_REFERENCE_SHORT + "\n" ); about.append( "For more information & download:\n" ); - about.append( Constants.APTX_WEB_SITE + "\n" ); + about.append( AptxConstants.APTX_WEB_SITE + "\n" ); about.append( "Documentation:\n" ); - about.append( Constants.APTX_DOC_SITE + "\n" ); - about.append( "Comments: " + Constants.AUTHOR_EMAIL ); - JOptionPane.showMessageDialog( null, about, Constants.PRG_NAME, JOptionPane.PLAIN_MESSAGE ); + about.append( AptxConstants.APTX_DOC_SITE + "\n" ); + about.append( "Comments: " + AptxConstants.AUTHOR_EMAIL ); + JOptionPane.showMessageDialog( null, about, AptxConstants.PRG_NAME, JOptionPane.PLAIN_MESSAGE ); } static void chooseNodeSize( final Options options, final Component parent ) { @@ -2210,7 +2217,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { tp.resetPreferredSize(); tp.repaint(); } - final String job_name = Constants.PRG_NAME; + final String job_name = AptxConstants.PRG_NAME; boolean error = false; String printer_name = null; try { @@ -2482,7 +2489,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { return null; } else { - final File to = new File( file.getAbsoluteFile().toString() + Constants.BACKUP_FILE_SUFFIX ); + final File to = new File( file.getAbsoluteFile().toString() + AptxConstants.BACKUP_FILE_SUFFIX ); try { ForesterUtil.copyFile( file, to ); }