2 package org.forester.applications;
6 import java.io.IOException;
8 import org.forester.archaeopteryx.AptxUtil;
9 import org.forester.archaeopteryx.AptxUtil.GraphicsExportType;
10 import org.forester.archaeopteryx.Configuration;
11 import org.forester.archaeopteryx.Options;
12 import org.forester.archaeopteryx.TreeColorSet;
14 public class phylo2graphics {
16 public static void main( final String[] args ) {
18 final Configuration config = new Configuration();
19 // Could also read a configuration file with:
20 // Configuration config = new Configuration("my_configuration_file.txt", false, false, false);
21 config.putDisplayColors( TreeColorSet.BACKGROUND, new Color( 255, 255, 255 ) );
22 config.putDisplayColors( TreeColorSet.BRANCH, new Color( 0, 0, 0 ) );
23 config.putDisplayColors( TreeColorSet.TAXONOMY, new Color( 0, 0, 0 ) );
24 config.setPhylogenyGraphicsType( Options.PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );
25 AptxUtil.writePhylogenyToGraphicsFile( new File( "/home/czmasek/tol_117_TEST.xml" ),
26 new File( "/home/czmasek/tol_117_TEST_.png" ),
29 GraphicsExportType.PNG,
31 // If the tree 'phy' already exists, can also use this:
32 //AptxUtil.writePhylogenyToGraphicsFile( phy,
33 // new File( "/home/czmasek/tol_117_TEST_.png" ),
36 // GraphicsExportType.PNG,
39 catch ( final IOException e ) {