MainFrame.about();
}
else if ( o == _help_item ) {
- help();
+ try {
+ AptxUtil.openWebsite( Constants.APTX_DOC_SITE, true, this );
+ }
+ catch ( final IOException e1 ) {
+ ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );
+ }
}
else if ( o == _website_item ) {
try {
void buildHelpMenu() {
_help_jmenu = MainFrame.createMenu( "Help", getConfiguration() );
- _help_jmenu.add( _help_item = new JMenuItem( "Help" ) );
+ _help_jmenu.add( _help_item = new JMenuItem( "Documentation" ) );
+ _help_jmenu.addSeparator();
_help_jmenu.add( _website_item = new JMenuItem( "Archaeopteryx Home" ) );
_aptx_ref_item = new JMenuItem( "Archaeopteryx Reference" );
_help_jmenu.add( _phyloxml_website_item = new JMenuItem( "phyloXML Home" ) );
return _options;
}
- void help() {
- final StringBuilder sb = new StringBuilder();
- sb.append( "Display options\n" );
- sb.append( "-------------------\n" );
- sb.append( "Use the checkboxes to select types of information to display on the tree.\n\n" );
- sb.append( "Clickable tree nodes\n" );
- sb.append( "--------------------\n" );
- sb.append( "Tree nodes can be clicked, the action is determined by the 'click on node to' menu\n" );
- sb.append( "or by right clicking:\n" );
- sb.append( "o Display Node Data -- display information for a node\n" );
- sb.append( "o Collapse/Uncollapse -- collapse and uncollapse subtree from clicked node\n" );
- sb.append( "o Root/Reroot -- change tree root to clicked node\n" );
- sb.append( "o Sub/Super Tree -- toggle between subtree from clicked node and whole tree\n" );
- sb.append( "o Swap Descendants -- switch descendant on either side of clicked node\n" );
- sb.append( "o Colorize Subtree -- color a subtree\n" );
- sb.append( "o Open Sequence Web -- launch a web browser to display sequence information\n" );
- sb.append( "o Open Taxonomy Web -- launch a web browser to display taxonomy information\n" );
- sb.append( "- there may be additional choices depending on this particular setup\n\n" );
- sb.append( "Right clicking on a node always displays the information of a node.\n\n" );
- sb.append( "Zooming\n" );
- sb.append( "---------\n" );
- sb.append( "The mouse wheel and the plus and minus keys control zooming.\n" );
- sb.append( "Mouse wheel+Ctrl changes the text size.\n" );
- sb.append( "Mouse wheel+Shift controls zooming in vertical direction only.\n" );
- sb.append( "Use the buttons on the control panel to zoom the tree in and out, horizontally or vertically.\n" );
- sb.append( "The entire tree can be fitted into the window by clicking the \"F\" button, or by pressing F, Delete, or Home.\n" );
- sb.append( "The up, down, left, and right keys can be used to move the visible part (if zoomed in).\n" );
- sb.append( "Up, down, left, and right+Shift can be used to control zooming horizontally and vertically.\n" );
- sb.append( "Plus and minus keys+Ctrl change the text size; F+Ctrl, Delete+Ctrl, or Home+Ctrl resets it.\n\n" );
- sb.append( "Quick tree manipulation:\n" );
- sb.append( "------------------------\n" );
- sb.append( "Order Subtrees -- order the tree by branch length\n" );
- sb.append( "Uncollapse All -- uncollapse any and all collapsed branches\n\n" );
- sb.append( "phyloXML\n" );
- sb.append( "-------------------\n" );
- sb.append( "Reference: " + Constants.PHYLOXML_REFERENCE + "\n" );
- sb.append( "Website: " + Constants.PHYLOXML_WEB_SITE + "\n" );
- sb.append( "Version: " + ForesterConstants.PHYLO_XML_VERSION + "\n" );
- sb.append( "\n" );
- sb.append( "For more information: http://www.phylosoft.org/archaeopteryx/\n" );
- sb.append( "Email: " + Constants.AUTHOR_EMAIL + "\n\n" );
- TextFrame.instantiate( sb.toString(), "Help", _textframes );
- }
+
void initializeTypeMenu( final Options options ) {
setTypeMenuToAllUnselected();
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
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
\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
\r
void initializeTypeMenu( final Options options ) {\r
setTypeMenuToAllUnselected();\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
private float _x_correction_factor = 0.0f;
private float _x_distance = 0.0f;
private float _y_distance = 0.0f;
-
// private Image offscreenImage;
// private Graphics offscreenGraphics;
// private Dimension offscreenDimension;
_control_panel.getColorAccSpeciesCb().setSelected( false );
}
_options.setColorLabelsSameAsParentBranch( true );
+ if ( getMainPanel().getMainFrame()._color_labels_same_as_parent_branch != null ) {
+ getMainPanel().getMainFrame()._color_labels_same_as_parent_branch.setSelected( true );
+ }
_control_panel.repaint();
}
setArrowCursor();
return getTreeColorSet().getSequenceColor();
}
-
public final TreeColorSet getTreeColorSet() {
return getMainPanel().getTreeColorSet();
}
if ( getControlPanel().isDynamicallyHideData() ) {
y = getTreeFontSet().getFontMetricsLarge().getHeight();
}
- final int h = y < default_height ? ForesterUtil.roundToInt( y ) :default_height;
+ final int h = y < default_height ? ForesterUtil.roundToInt( y ) : default_height;
rds.setRenderingHeight( h > 1 ? h : 2 );
if ( getControlPanel().isDrawPhylogram() ) {
rds.render( node.getXcoord() + x, node.getYcoord() - ( h / 2 ), g, this, to_pdf );
}
}
}
-
if ( getControlPanel().isShowVectorData() && ( node.getNodeData().getVector() != null )
&& ( node.getNodeData().getVector().size() > 0 ) && ( getStatisticsForExpressionValues() != null ) ) {
final RenderableVector rv = RenderableVector.createInstance( node.getNodeData().getVector(),
getStatisticsForExpressionValues(),
getConfiguration() );
-
if ( rv != null ) {
double domain_add = 0;
if ( getControlPanel().isShowDomainArchitectures() && node.getNodeData().isHasSequence()
length_of_longest_text = calcLengthOfLongestText();
}
rv.render( getPhylogeny().getFirstExternalNode().getXcoord() + length_of_longest_text + domain_add,
- node.getYcoord() - 3,
- g,
- this,
- to_pdf);
+ node.getYcoord() - 3,
+ g,
+ this,
+ to_pdf );
}
}
}