debian/0000755000000000000000000000000012167005223007164 5ustar debian/control0000644000000000000000000000255512164007250010575 0ustar Source: figtree Maintainer: Debian Med Packaging Team Uploaders: Andreas Tille , Olivier Sallou Section: science Priority: optional Build-Depends: debhelper (>= 9), javahelper (>=0.25), default-jdk, ant, libjebl2-java, libjam-java (>= 0.0.r304), libtrove-java, libfreehep-graphics2d-java, libfreehep-graphicsio-java, libfreehep-graphicsio-pdf-java, libfreehep-graphicsio-ps-java, libfreehep-graphicsio-swf-java, libfreehep-graphicsio-svg-java, libfreehep-graphicsio-emf-java, libitext5-java Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/figtree/trunk/ Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/figtree/trunk Homepage: http://tree.bio.ed.ac.uk/software/figtree/ Package: figtree Architecture: all Depends: ${misc:Depends}, ${java:Depends} Description: graphical phylogenetic tree viewer FigTree is designed as a graphical viewer of phylogenetic trees and as a program for producing publication-ready figures. In particular it is designed to display summarized and annotated trees produced by BEAST. debian/figtree.menu0000644000000000000000000000032411745017571011510 0ustar ?package(figtree):\ needs="x11"\ section="Applications/Science/Biology"\ title="FigTree"\ command="/usr/bin/figtree"\ hints="graphical phylogenetic tree viewer"\ icon="/usr/share/pixmaps/figtree.xpm" debian/figtree.dirs0000644000000000000000000000001011523534676011501 0ustar usr/bin debian/figtree.docs0000644000000000000000000000003211523553635011470 0ustar release/common/README.txt debian/README.source0000644000000000000000000000126411523751047011355 0ustar The FigTree source is provided in SVN and the script debian/get-orig-source is intended to check out the parts which are needed to create the figtree.jat binary. To avoid unneeded stuff - especially those binary jar files which are shipped but not actually needed to build are removed from the trunk before creating the orig.tar.gz tarball. The build.xml has two additional targets figtree-pdf.jar: Commandline tool which outputs PDF to stdout but no real description how to use it figtree.war: No idea how to use this These targets are not builded in the Debian package (see patch) -- Andreas Tille Mon, 07 Feb 2011 12:02:43 +0100 debian/figtree.manifest0000644000000000000000000000076012006432221012336 0ustar usr/share/java/figtree.jar: Class-Path: /usr/share/java/jebl.jar /usr/share/java/jam.jar /usr/share/java/freehep-graphics2d.jar /usr/share/java/freehep-graphicsio.jar /usr/share/java/freehep-graphicsio-pdf.jar /usr/share/java/freehep-graphicsio-ps.jar /usr/share/java/freehep-graphicsio-emf.jar /usr/share/java/freehep-graphicsio-swf.jar /usr/share/java/freehep-graphicsio-svg.jar /usr/share/java/freehep-export.jar /usr/share/java/itext5.jar Main-Class: figtree/application/FigTreeApplication debian/figtree.links0000644000000000000000000000005311526727042011661 0ustar usr/share/java/figtree.jar usr/bin/figtree debian/rules0000755000000000000000000000047512167004451010254 0ustar #!/usr/bin/make -f # debian/rules for figtree # Andreas Tille # GPL # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export JAVA_HOME=/usr/lib/jvm/default-java %: dh $@ --with javahelper override_dh_auto_clean: rm -rf dist ant clean get-orig-source: . debian/get-orig-source debian/watch0000644000000000000000000000057511523336554010235 0ustar # Obtaining the source tarball of FigTree is a bit tricky because here is no # explicite link to a downloadable tarball on the web page and the source is # only in SVN version=3 http://tree.bio.ed.ac.uk/software/figtree/ \ /download\.html\?name=figtree&version=v([\d.]*).id=\d+&num=3 \ debian debian/get-orig-source # /download.html?name=figtree&version=v(.*)&id=82&num=3 \ debian/copyright0000644000000000000000000000557312006430511011123 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: FigTree Upstream-Contact: Andrew Rambaut Source: http://code.google.com/p/figtree/ Files: * Copyright: © 2005-2011 Andrew Rambaut License: GPL Files: src/figtree/application/Arguments.java src/figtree/application/Utils.java src/figtree/ui/components/ColorWellButton.java src/figtree/ui/components/JVerticalLabel.java src/figtree/ui/components/RealNumberField.java src/figtree/ui/components/WholeNumberField.java Copyright: © 2009 JAM Development Team License: LGPL Files: src/figtree/panel/SimpleTreeViewer.java src/figtree/treeviewer/annotations/AnnotationDefinitionsDialog.java src/figtree/treeviewer/annotations/AnnotationDialog.java src/figtree/treeviewer/annotations/DefineAnnotationDialog.java src/figtree/treeviewer/annotations/SelectAnnotationDialog.java src/figtree/treeviewer/DefaultTreeViewer.java src/figtree/treeviewer/ExtendedTreeViewer.java Copyright: © 2002-2005 BEAST Development Core Team License: LGPL Files: debian/* Copyright: © 2011 Andreas Tille License: LGPL License: GPL This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License can be found in the file `/usr/share/common-licenses/GPL'. License: LGPL This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. . This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with this library ('COPYING'); if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU LESSER GENERAL PUBLIC LICENSE can be found in the file `/usr/share/common-licenses/LGPL'. debian/source/0000755000000000000000000000000012163772034010473 5ustar debian/source/format0000644000000000000000000000001412163035761011700 0ustar 3.0 (quilt) debian/get-orig-source0000755000000000000000000000337012163531070012130 0ustar #!/bin/sh # Obtaining the source tarball of FigTree is a bit tricky because here is no # explicite link to a downloadable tarball on the web page and the source is # only in SVN PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'` if ! echo $@ | grep -q upstream-version ; then VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'` else VERSION=`echo $@ | sed 's?^.*--upstream-version \([0-9.]\+\) .*download.html.*?\1?'` if echo "$VERSION" | grep -q "upstream-version" ; then echo "Unable to parse version number" exit fi fi cd .. rm -f download.html mkdir -p tarballs cd tarballs svn export http://figtree.googlecode.com/svn/trunk/ # FIXME: Replace this by mv once the script is sufficiently tested cp -a trunk ${PKG}-${VERSION} cd ${PKG}-${VERSION} # remove .svn dirs taht do not belong into upstream tarball find . -type d -name .svn -exec rm -rf \{\} \; 2>/dev/null # fix some broken permissions for ext in icns jar java jnilib pdf png psd pdf tif ; do find . -type f -name "*.${ext}" -exec chmod 644 \{\} \; done # remove unneeded OSes rm -rf release/Mac release/Windows # remove jars which are provided as binaries but are not directly needed to build FigTree #for jar in \ # jwt/ \ # libquaqua.jnilib \ # jdom.jar \ # swing-layout.jar \ # quaqua-filechooser-only.jar \ # quaqua-colorchooser-only.jar \ # quaqua.jar \ # jam.jar \ # jebl.jar \ # freehep.jar \ # itext.jar \ # ; do # rm -rf lib/$jar #done # No particular JAR is needed any more rm -rf lib/* cd .. GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX --exclude-vcs -caf "$PKG"_"$VERSION".orig.tar.xz "$PKG"-"$VERSION" rm -rf "$PKG"-"$VERSION" rm -rf trunk debian/figtree.install0000644000000000000000000000010011526727026012202 0ustar dist/figtree.jar usr/share/java debian/*.xpm usr/share/pixmaps debian/changelog0000644000000000000000000000270012167004553011042 0ustar figtree (1.4-2) unstable; urgency=low * Force set of JAVA_HOME in debian/rules (Closes: #715225). -- Olivier Sallou Tue, 09 Jul 2013 14:42:53 +0200 figtree (1.4-1) unstable; urgency=low [ Andreas Tille ] * New upstream version (adapted quilt patches) * debian/control: - Standards-Version: 3.9.4 (no changes needed) - Versioned Build-Depends: libjam-java (>= 0.0.r304) - cme fix dpkg-control - Use anonscm in Vcs fields * debian/get-orig-source: Use xz compression for source tarball [ Olivier Sallou ] * debian/patches/fix_itext_api_change.patch: Add patch to manage iText API change Closes: #713143 * Patch build.xml to load JVM Hotspot library -- Andreas Tille Mon, 17 Dec 2012 13:32:34 +0100 figtree (1.3.1-2) unstable; urgency=low * Apply patch provided by James Page to build with openjdk-7 (thanks to James) Closes: #683532 * debian/control: - Switch Build-Depends to default-jdk (also thanks to James) - Fixed Vcs fields - Standards-Version: 3.9.3 (no changes needed) * debhelper 9 (control+compat) * debian/copyright: Fixed some DEP5 issues -- Andreas Tille Thu, 02 Aug 2012 09:43:00 +0200 figtree (1.3.1-1) unstable; urgency=low * Initial release (Closes: #614278) Fixed copyright regarding some LGPLed files -- Andreas Tille Mon, 21 Feb 2011 08:17:38 +0100 debian/patches/0000755000000000000000000000000012163772034010622 5ustar debian/patches/ignore_quaqua.patch0000644000000000000000000001522212164007250014475 0ustar Author: Andreas Tille Date: Mon, 07 Feb 2011 12:02:43 +0100 Description: Quaqua (http://www.randelshofer.ch/quaqua/) is a Java class which provides OSX look and feel but only works on Mac. So this is simply not used on Linux and I simply deleted all lines containing the string [qQ]aqua which seems to lead to a usable application. --- a/src/figtree/application/FigTreeApplication.java +++ b/src/figtree/application/FigTreeApplication.java @@ -55,8 +55,6 @@ import javax.swing.*; -import ch.randelshofer.quaqua.QuaquaManager; - public class FigTreeApplication extends MultiDocApplication { public static final String VERSION = "1.4.1"; @@ -321,41 +319,6 @@ System.setProperty("apple.awt.showGrowBox","true"); System.setProperty("apple.awt.graphics.UseQuartz","true"); - try { - // set the Quaqua Look and Feel in the UIManager - javax.swing.SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - try { - // Only override the UI's necessary for ColorChooser and - // FileChooser: - Set includes = new HashSet(); - includes.add("ColorChooser"); - includes.add("FileChooser"); - includes.add("Component"); - includes.add("Browser"); - includes.add("Tree"); - includes.add("SplitPane"); - includes.add("TitledBorder"); - - try { - QuaquaManager.setIncludedUIs(includes); - } catch (java.lang.NoClassDefFoundError ncdfe) { - // this is to protect against the figtree.jar being - // run on Mac OS without Quaqua on the classpath - } - - UIManager.setLookAndFeel( - "ch.randelshofer.quaqua.QuaquaLookAndFeel" - ); - - lafLoaded = true; - } catch (Exception e) { - } - } - }); - } catch (Exception e) { - } - UIManager.put("SystemFont", new Font("Lucida Grande", Font.PLAIN, 13)); UIManager.put("SmallSystemFont", new Font("Lucida Grande", Font.PLAIN, 11)); } @@ -423,4 +386,4 @@ } } -} \ No newline at end of file +} --- a/src/figtree/treeviewer/TreeViewerController.java +++ b/src/figtree/treeviewer/TreeViewerController.java @@ -86,13 +86,10 @@ rectangularTreeToggle.setFocusable(false); polarTreeToggle.setFocusable(false); radialTreeToggle.setFocusable(false); - rectangularTreeToggle.putClientProperty("Quaqua.Button.style", "toggleWest"); rectangularTreeToggle.putClientProperty("JButton.buttonType", "segmentedTextured"); rectangularTreeToggle.putClientProperty("JButton.segmentPosition", "first"); - polarTreeToggle.putClientProperty("Quaqua.Button.style", "toggleCenter"); polarTreeToggle.putClientProperty("JButton.buttonType", "segmentedTextured"); polarTreeToggle.putClientProperty("JButton.segmentPosition", "middle"); - radialTreeToggle.putClientProperty("Quaqua.Button.style", "toggleEast"); radialTreeToggle.putClientProperty("JButton.buttonType", "segmentedTextured"); radialTreeToggle.putClientProperty("JButton.segmentPosition", "last"); ButtonGroup buttonGroup = new ButtonGroup(); --- a/src/figtree/application/FigTreeFrame.java +++ b/src/figtree/application/FigTreeFrame.java @@ -206,7 +206,6 @@ // treeViewer.showStatistics(); // } // }); -// settingsToolButton.putClientProperty("Quaqua.Button.style", "toolBarRollover"); // toolBar.addComponent(settingsToolButton); // settingsToolButton.setEnabled(false); @@ -217,19 +216,16 @@ toggle1.setFocusable(false); toggle1.putClientProperty("JButton.buttonType", "segmentedTextured"); toggle1.putClientProperty("JButton.segmentPosition", "first"); - toggle1.putClientProperty( "Quaqua.Button.style", "toggleWest"); final JToggleButton toggle2 = new JToggleButton("Clade"); toggle2.setFocusable(false); toggle2.putClientProperty("JButton.buttonType", "segmentedTextured"); toggle2.putClientProperty("JButton.segmentPosition", "middle"); - toggle2.putClientProperty( "Quaqua.Button.style", "toggleCenter"); final JToggleButton toggle3 = new JToggleButton("Taxa"); toggle3.setFocusable(false); toggle3.putClientProperty("JButton.buttonType", "segmentedTextured"); toggle3.putClientProperty("JButton.segmentPosition", "last"); - toggle3.putClientProperty( "Quaqua.Button.style", "toggleEast"); ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(toggle1); @@ -283,7 +279,6 @@ prevTreeToolButton.setFocusable(false); prevTreeToolButton.putClientProperty("JButton.buttonType", "segmentedTextured"); prevTreeToolButton.putClientProperty("JButton.segmentPosition", "first"); - prevTreeToolButton.putClientProperty( "Quaqua.Button.style", "toggleWest"); final ToolbarAction nextTreeToolbarAction = new ToolbarAction(null, "Next Tree...", nextIcon) { @@ -303,7 +298,6 @@ nextTreeToolButton.setFocusable(false); nextTreeToolButton.putClientProperty("JButton.buttonType", "segmentedTextured"); nextTreeToolButton.putClientProperty("JButton.segmentPosition", "last"); - nextTreeToolButton.putClientProperty( "Quaqua.Button.style", "toggleEast"); nextTreeToolbarAction.setEnabled(treeViewer.getCurrentTreeIndex() < treeViewer.getTreeCount() - 1); prevTreeToolbarAction.setEnabled(treeViewer.getCurrentTreeIndex() > 0); @@ -1718,4 +1712,4 @@ private AnnotationDialog annotationDialog = null; private AnnotationDialog copyAnnotationDialog = null; private SelectAnnotationDialog selectAnnotationDialog = null; -} \ No newline at end of file +} --- a/src/figtree/treeviewer/ControllerOptionsPanel.java +++ b/src/figtree/treeviewer/ControllerOptionsPanel.java @@ -25,7 +25,6 @@ } public static void setComponentLook(JComponent comp) { - comp.putClientProperty("Quaqua.Component.visualMargin", new Insets(0,0,0,0)); Font font = UIManager.getFont("SmallSystemFont"); if (font != null) { comp.setFont(font); debian/patches/java7-compat.patch0000644000000000000000000000120312164007250014120 0ustar Author: James Page Date: Wed, 01 Aug 2012 14:58:30 +0100 Bugs-Debian: http://bugs.debian.org/683532 Description: Fix up Painter symbol resolution issue in TreeView class. --- a/src/figtree/treeviewer/TreePane.java +++ b/src/figtree/treeviewer/TreePane.java @@ -8,6 +8,7 @@ import figtree.treeviewer.decorators.*; import figtree.treeviewer.painters.*; import figtree.treeviewer.treelayouts.*; +import figtree.treeviewer.painters.Painter; import javax.swing.*; import java.awt.*; @@ -2231,4 +2232,4 @@ private Map calloutPaths = new HashMap(); -} \ No newline at end of file +} debian/patches/fix_itext_api_change.patch0000644000000000000000000000125112163532331015775 0ustar Subject: iText changed its API Description: DefaultFontMapper moved to awt package in iText5, need to update code to match Debian available release Last-Updated: 2013-06-29 Author: Olivier Sallou Forwarded: no --- a/src/figtree/application/FigTreeFrame.java +++ b/src/figtree/application/FigTreeFrame.java @@ -22,7 +22,7 @@ package figtree.application; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; -import com.itextpdf.text.pdf.DefaultFontMapper; +import com.itextpdf.awt.DefaultFontMapper; import com.itextpdf.text.pdf.PdfContentByte; import com.itextpdf.text.pdf.PdfTemplate; import com.itextpdf.text.pdf.PdfWriter; debian/patches/remove_webui.patch0000644000000000000000000004100212063610311014314 0ustar Author: Andreas Tille Date: Mon, 07 Feb 2011 12:02:43 +0100 Description: The web GUI (servlet) is not used nor shipped in the binary packages. If the files that are belonging to this gui are removed there is no need for shipping lib/jwt/*.jar which is one further step in the direction to remove binary only code from the tarball --- a/src/figtree/webui/FigTreeWebApplication.java +++ /dev/null @@ -1,298 +0,0 @@ -package figtree.webui; - -import java.awt.BasicStroke; -import java.awt.Font; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.io.Reader; -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.List; - -import jebl.evolution.io.ImportException; -import jebl.evolution.io.NewickImporter; -import jebl.evolution.trees.RootedTree; -import jebl.evolution.trees.SortedRootedTree; -import jebl.evolution.trees.TransformedRootedTree; -import jebl.evolution.trees.Tree; -import eu.webtoolkit.jwt.AlignmentFlag; -import eu.webtoolkit.jwt.Signal; -import eu.webtoolkit.jwt.Signal1.Listener; -import eu.webtoolkit.jwt.WApplication; -import eu.webtoolkit.jwt.WBoxLayout; -import eu.webtoolkit.jwt.WCheckBox; -import eu.webtoolkit.jwt.WComboBox; -import eu.webtoolkit.jwt.WContainerWidget; -import eu.webtoolkit.jwt.WEnvironment; -import eu.webtoolkit.jwt.WFormWidget; -import eu.webtoolkit.jwt.WHBoxLayout; -import eu.webtoolkit.jwt.WIntValidator; -import eu.webtoolkit.jwt.WLabel; -import eu.webtoolkit.jwt.WLength; -import eu.webtoolkit.jwt.WSpinBox; -import eu.webtoolkit.jwt.WVBoxLayout; -import figtree.application.FigTreeNexusImporter; -import figtree.panel.SimpleLabelPainter; -import figtree.treeviewer.TreePane; -import figtree.treeviewer.treelayouts.PolarTreeLayout; -import figtree.treeviewer.treelayouts.RadialTreeLayout; -import figtree.treeviewer.treelayouts.RectilinearTreeLayout; - -public class FigTreeWebApplication extends WApplication { - private TreeWidget treeWidget; - private SimpleLabelPainter tipPainter; - private SimpleLabelPainter nodePainter; - private SimpleLabelPainter branchPainter; - - public FigTreeWebApplication(WEnvironment env) { - super(env); - setTitle("FigTree"); - useStyleSheet("figtree.css"); - - WVBoxLayout layout = new WVBoxLayout(getRoot()); - - FileUploadWidget uploadWidget = new FileUploadWidget(); - uploadWidget.fileUploaded().addListener(this, new Listener() { - @Override - public void trigger(String path) { - readFile(path); - } - }); - - layout.addWidget(uploadWidget); - layout.addWidget(treeWidget = new TreeWidget(), 1); - treeWidget.setStyleClass("tree"); - - readFile("/etc/figtree/example.tree"); - - treeWidget.getTreePane().setTipLabelPainter - (tipPainter = new SimpleLabelPainter(SimpleLabelPainter.PainterIntent.TIP)); - treeWidget.getTreePane().setNodeLabelPainter - (nodePainter = new SimpleLabelPainter(SimpleLabelPainter.PainterIntent.NODE)); - treeWidget.getTreePane().setBranchLabelPainter - (branchPainter = new SimpleLabelPainter(SimpleLabelPainter.PainterIntent.BRANCH)); - - createControls(layout); - } - - - private void readFile(String path) { - try { - FileReader reader = new FileReader(path); - readData(reader, true); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - - private void createControls(WVBoxLayout layout) { - WHBoxLayout controlsLayout = new WHBoxLayout(); - layout.addLayout(controlsLayout, 0, AlignmentFlag.AlignJustify, AlignmentFlag.AlignTop); - - WVBoxLayout column = new WVBoxLayout(); - controlsLayout.addLayout(column, 0, AlignmentFlag.AlignJustify, AlignmentFlag.AlignMiddle); - - WComboBox box = new WComboBox(); - addField(column, "Layout: ", box, AlignmentFlag.AlignLeft); - - box.addItem("Rectilinear"); - box.addItem("Radial"); - box.addItem("Polar"); - box.activated().addListener(this, new Listener() { - @Override - public void trigger(Integer choice) { - switch (choice) { - case 0: - treeWidget.getTreePane().setTreeLayout(new RectilinearTreeLayout()); break; - case 1: - treeWidget.getTreePane().setTreeLayout(new RadialTreeLayout()); break; - case 2: - treeWidget.getTreePane().setTreeLayout(new PolarTreeLayout()); - } - } - }); - - column = new WVBoxLayout(); - controlsLayout.addLayout(column, 0, AlignmentFlag.AlignJustify, AlignmentFlag.AlignMiddle); - - WSpinBox spinBox = new WSpinBox(); - spinBox.setValue(2); - spinBox.setRange(0, 48); - spinBox.setMaxLength(3); - addField(column, "Line Weight: ", spinBox, AlignmentFlag.AlignRight); - - spinBox.valueChanged().addListener(this, new Listener() { - @Override - public void trigger(Double value) { - treeWidget.getTreePane().setBranchStroke(new BasicStroke(value.floatValue())); - } - }); - spinBox.valueChanged().trigger(spinBox.getValue()); - - spinBox = new WSpinBox(); - spinBox.setValue(6); - spinBox.setRange(0, 48); - spinBox.setValidator(new WIntValidator(0, 48)); - spinBox.setMaxLength(3); - addField(column, "Font Size: ", spinBox, AlignmentFlag.AlignRight); - - spinBox.valueChanged().addListener(this, new Listener() { - @Override - public void trigger(Double value) { - tipPainter.setFont(new Font("sansserif", Font.PLAIN, value.intValue())); - } - }); - spinBox.valueChanged().trigger(spinBox.getValue()); - - column = new WVBoxLayout(); - controlsLayout.addLayout(column, 0, AlignmentFlag.AlignJustify, AlignmentFlag.AlignMiddle); - - final WCheckBox midPointCheck = new WCheckBox("Midpoint root"); - - midPointCheck.setChecked(false); - addField(column, null, midPointCheck, AlignmentFlag.AlignRight); - - midPointCheck.changed().addListener(this, new Signal.Listener() { - @Override - public void trigger() { - if (midPointCheck.isChecked()) { - treeWidget.getTreePane().setRootingOn(true); - treeWidget.getTreePane().setRootingType(TreePane.RootingType.MID_POINT); - } else { - treeWidget.getTreePane().setRootingOn(false); - treeWidget.getTreePane().setRootingType(TreePane.RootingType.USER_ROOTING); - } - } - }); - - final WComboBox orderCombo = new WComboBox(); - orderCombo.addItem("Off"); - orderCombo.addItem("Increasing"); - orderCombo.addItem("Decreasing"); - orderCombo.resize(new WLength(120), WLength.Auto); - - addField(column, "Order: ", orderCombo, AlignmentFlag.AlignRight); - - orderCombo.changed().addListener(this, new Signal.Listener() { - @Override - public void trigger() { - if (orderCombo.getCurrentIndex() == 0) { - treeWidget.getTreePane().setOrderBranchesOn(false); - } else { - treeWidget.getTreePane().setOrderBranchesOn(true); - treeWidget.getTreePane().setBranchOrdering(SortedRootedTree.BranchOrdering.values()[orderCombo.getCurrentIndex() - 1]); - } - } - }); - - final WComboBox transformCombo = new WComboBox(); - transformCombo.addItem("Off"); - transformCombo.addItem(TransformedRootedTree.Transform.CLADOGRAM.toString()); - transformCombo.addItem(TransformedRootedTree.Transform.PROPORTIONAL.toString()); - transformCombo.addItem(TransformedRootedTree.Transform.EQUAL_LENGTHS.toString()); - transformCombo.resize(new WLength(120), WLength.Auto); - - addField(column, "Transform: ", transformCombo, AlignmentFlag.AlignRight); - - transformCombo.changed().addListener(this, new Signal.Listener() { - @Override - public void trigger() { - if (transformCombo.getCurrentIndex() == 0) { - treeWidget.getTreePane().setTransformBranchesOn(false); - } else { - treeWidget.getTreePane().setTransformBranchesOn(true); - treeWidget.getTreePane().setBranchTransform(TransformedRootedTree.Transform.values()[transformCombo.getCurrentIndex() - 1]); - } - } - }); - - column = new WVBoxLayout(); - controlsLayout.addLayout(column, 0, AlignmentFlag.AlignJustify, AlignmentFlag.AlignMiddle); - WComboBox combo = addLabelCombo(column, tipPainter, "Tips: "); - combo.setCurrentIndex(1); - combo.changed().trigger(); - addLabelCombo(column, nodePainter, "Nodes: "); - addLabelCombo(column, branchPainter, "Branches: "); - } - - - private WComboBox addLabelCombo(WVBoxLayout column, final SimpleLabelPainter labelPainter, String title) { - labelPainter.setNumberFormat(new DecimalFormat("#.####")); - labelPainter.setFont(new Font("sansserif", Font.PLAIN, 8)); - - String[] attributes = labelPainter.getAttributes(); - - final WComboBox displayAttributeCombo = new WComboBox(); - displayAttributeCombo.addItem("None"); - for (String attr : attributes) { - displayAttributeCombo.addItem(attr); - } - - addField(column, title, displayAttributeCombo, AlignmentFlag.AlignRight); - - displayAttributeCombo.changed().addListener(this, new Signal.Listener() { - @Override - public void trigger() { - String attribute = (String)displayAttributeCombo.getCurrentText().toString(); - if (attribute.equals("none")) { - labelPainter.setVisible(false); - } else { - labelPainter.setDisplayAttribute(attribute); - labelPainter.setVisible(true); - } - } - }); - displayAttributeCombo.changed().trigger(); - - return displayAttributeCombo; - } - - - private void addField(WBoxLayout controlsLayout, String label, WFormWidget widget, AlignmentFlag alignment) { - WContainerWidget w = new WContainerWidget(); - if (label != null) { - WLabel l; - w.addWidget(l = new WLabel(label)); - l.setBuddy(widget); - } - w.addWidget(widget); - controlsLayout.addWidget(w, 0, alignment, AlignmentFlag.AlignTop); - } - - - protected boolean readData(Reader reader, boolean isNexus) throws IOException { - - List trees = new ArrayList(); - - try { - if (isNexus) { - FigTreeNexusImporter importer = new FigTreeNexusImporter(reader); - while (importer.hasTree()) { - Tree tree = importer.importNextTree(); - trees.add(tree); - } - } else { - NewickImporter importer = new NewickImporter(reader, true); - while (importer.hasTree()) { - Tree tree = importer.importNextTree(); - trees.add(tree); - } - } - - if (trees.size() == 0) { - throw new ImportException("This file contained no trees."); - } - - treeWidget.getTreePane().setTree((RootedTree) trees.get(0)); - } catch (ImportException ie) { - // FIXME - return false; - } - - return true; - } -} --- a/src/figtree/webui/FileUploadWidget.java +++ /dev/null @@ -1,56 +0,0 @@ -package figtree.webui; - -import eu.webtoolkit.jwt.Side; -import eu.webtoolkit.jwt.Signal; -import eu.webtoolkit.jwt.Signal1; -import eu.webtoolkit.jwt.WApplication; -import eu.webtoolkit.jwt.WContainerWidget; -import eu.webtoolkit.jwt.WFileUpload; -import eu.webtoolkit.jwt.WLabel; -import eu.webtoolkit.jwt.WText; - -public class FileUploadWidget extends WContainerWidget { - - private WFileUpload fileUpload; - private Signal1 fileUploaded = new Signal1(); - private WLabel label; - private WText currentTree; - - public FileUploadWidget() { - currentTree = new WText(this); - currentTree.setStyleClass("filename"); - currentTree.setInline(false); - currentTree.setFloatSide(Side.Right); - label = new WLabel("Upload tree: ", this); - createUpload(); - } - - private void createUpload() { - fileUpload = new WFileUpload(this); - fileUpload.changed().addListener(this, new Signal.Listener() { - @Override - public void trigger() { - fileUpload.upload(); - } }); - - fileUpload.uploaded().addListener(this, new Signal.Listener() { - @Override - public void trigger() { - handleUpload(); - } - }); - } - - private void handleUpload() { - WApplication.getInstance().setTitle("FigTree: " + fileUpload.getClientFileName()); - currentTree.setText("Read file: " + fileUpload.getClientFileName() + ""); - fileUploaded.trigger(fileUpload.getSpoolFileName()); - - fileUpload.remove(); - createUpload(); - } - - public Signal1 fileUploaded() { - return fileUploaded; - } -} --- a/src/figtree/webui/Main.java +++ /dev/null @@ -1,18 +0,0 @@ -package figtree.webui; - -import eu.webtoolkit.jwt.WApplication; -import eu.webtoolkit.jwt.WEnvironment; -import eu.webtoolkit.jwt.WtServlet; - -public class Main extends WtServlet { - /** - * - */ - private static final long serialVersionUID = -7955893733032239397L; - - @Override - public WApplication createApplication(WEnvironment env) { - return new FigTreeWebApplication(env); - } - -} --- a/src/figtree/webui/TreeWidget.java +++ /dev/null @@ -1,128 +0,0 @@ -package figtree.webui; - -import java.awt.Color; -import java.awt.Graphics; -import java.awt.event.MouseEvent; - -import eu.webtoolkit.jwt.KeyboardModifier; -import eu.webtoolkit.jwt.Signal1; -import eu.webtoolkit.jwt.WLength; -import eu.webtoolkit.jwt.WMouseEvent; -import eu.webtoolkit.jwt.WPaintDevice; -import eu.webtoolkit.jwt.WPaintedWidget; -import eu.webtoolkit.jwt.WPainter; -import eu.webtoolkit.jwt.WMouseEvent.Button; -import eu.webtoolkit.jwt.utils.WebGraphics2D; -import figtree.treeviewer.TreePane; -import figtree.treeviewer.TreePaneSelector; -import figtree.treeviewer.treelayouts.RectilinearTreeLayout; - -public class TreeWidget extends WPaintedWidget { - - private TreePane treePane; - private WebGraphics2D graphics = new WebGraphics2D(new WPainter()); - - public TreeWidget() { - treePane = new TreePane() { - private static final long serialVersionUID = 1L; - - @Override - public void repaint() { - TreeWidget.this.update(); - } - - @Override - public Graphics getGraphics() { - return graphics; - } - }; - - treePane.setTreeLayout(new RectilinearTreeLayout()); - treePane.setSelectionColor(new Color(90, 108, 128)); - final TreePaneSelector selector = new TreePaneSelector(treePane); - - clicked().addListener(this, new Signal1.Listener() { - @Override - public void trigger(WMouseEvent event) { - int dx = event.getDragDelta().x; - int dy = event.getDragDelta().y; - if (dx*dx + dy*dy < 4) - selector.mouseClicked(convertMouseEvent(event, MouseEvent.MOUSE_CLICKED)); - } - }); - - mouseWentDown().addListener(this, new Signal1.Listener() { - @Override - public void trigger(WMouseEvent event) { - selector.mousePressed(convertMouseEvent(event, MouseEvent.MOUSE_PRESSED)); - } - }); - - mouseWentUp().addListener(this, new Signal1.Listener() { - @Override - public void trigger(WMouseEvent event) { - selector.mouseReleased(convertMouseEvent(event, MouseEvent.MOUSE_RELEASED)); - } - }); - - mouseDragged().addListener(this, new Signal1.Listener() { - @Override - public void trigger(WMouseEvent event) { - selector.mouseDragged(convertMouseEvent(event, MouseEvent.MOUSE_DRAGGED)); - } - }); - } - - MouseEvent convertMouseEvent(WMouseEvent event, int type) { - int modifiers = 0; - - if (event.getModifiers().contains(KeyboardModifier.AltModifier)) - modifiers |= MouseEvent.ALT_DOWN_MASK; - if (event.getModifiers().contains(KeyboardModifier.ShiftModifier)) - modifiers |= MouseEvent.SHIFT_DOWN_MASK; - if (event.getModifiers().contains(KeyboardModifier.ControlModifier)) - modifiers |= MouseEvent.CTRL_DOWN_MASK; - if (event.getModifiers().contains(KeyboardModifier.MetaModifier)) - modifiers |= MouseEvent.META_DOWN_MASK; - - int button = 0; - - if (event.getButton() == Button.LeftButton) { - modifiers |= MouseEvent.BUTTON1_DOWN_MASK; - button = MouseEvent.BUTTON1; - } else if (event.getButton() == Button.MiddleButton) { - modifiers |= MouseEvent.BUTTON2_DOWN_MASK; - button = MouseEvent.BUTTON2; - } else if (event.getButton() == Button.RightButton) { - modifiers |= MouseEvent.BUTTON3_DOWN_MASK; - button = MouseEvent.BUTTON3; - } - - return new MouseEvent(treePane, type, System.currentTimeMillis(), - modifiers, event.getWidget().x, event.getWidget().y, 1, event.getButton() == Button.RightButton, button); - } - - @Override - public void resize(WLength width, WLength height) { - super.resize(width, height); - treePane.setSize((int)width.toPixels(), (int)height.toPixels()); - } - - - @Override - protected void layoutSizeChanged(int width, int height) { - super.layoutSizeChanged(width, height); - treePane.setSize(width, height); - } - - @Override - protected void paintEvent(WPaintDevice paintDevice) { - WPainter painter = new WPainter(paintDevice); - WebGraphics2D graphics = new WebGraphics2D(painter); - treePane.paint(graphics); - } - - public TreePane getTreePane() { - return treePane; - } -} debian/patches/fix_classpath_in_build_xml.patch0000644000000000000000000000241612163530337017221 0ustar Description: Fix Classpath to use Debian packaged classes Author: Andreas Tille Last-Updated: 2013-06-28 Forwarded: no Subject: adapt build file to match debian env --- a/build.xml +++ b/build.xml @@ -11,6 +11,7 @@ + @@ -35,7 +36,7 @@ + classpath="${deblib}/jebl.jar:${deblib}/jam.jar:${deblib}/freehep-graphics2d.jar:${deblib}/freehep-graphicsio.jar:${deblib}/freehep-graphicsio-pdf.jar:${deblib}/freehep-graphicsio-ps.jar:${deblib}/freehep-graphicsio-emf.jar:${deblib}/freehep-graphicsio-swf.jar:${deblib}/freehep-graphicsio-svg.jar:${deblib}/freehep-export.jar:${deblib}/itext5.jar:${env.JAVA_HOME}/lib/sa-jdi.jar"> debian/patches/series0000644000000000000000000000022312163530337012032 0ustar build_figtree_gui_only.patch ignore_quaqua.patch remove_webui.patch fix_classpath_in_build_xml.patch java7-compat.patch fix_itext_api_change.patch debian/patches/build_figtree_gui_only.patch0000644000000000000000000000255612164007250016354 0ustar Author: Andreas Tille Date: Mon, 07 Feb 2011 12:02:43 +0100 Description: Do not build targets figtree-pdf.jar and figtree.war --- a/build.xml +++ b/build.xml @@ -59,36 +59,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - debian/compat0000644000000000000000000000000212006430302010352 0ustar 9 debian/figtree.manpages0000644000000000000000000000001311524050471012321 0ustar debian/*.1 debian/figtree.10000644000000000000000000000477311524050770010711 0ustar .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4. .TH FIGTREE "1" "February 2011" "figtree " "User Commands" .SH NAME figtree \- graphical phylogenetic tree viewer .SH DESCRIPTION Figtree is a (phylogenetic) tree figure drawing tool. It is designed as a graphical viewer of phylogenetic trees and as a program for producing publication-ready figures. In particular it is designed to display summarized and annotated trees produced by BEAST. .SH AUTHOR Andrew Rambaut .P Institute of Evolutionary Biology .P University of Edinburgh .P a.rambaut@ed.ac.uk .P http://tree.bio.ed.ac.uk/ .IP Uses the Java Evolutionary Biology Library (JEBL) .IP http://jebl.sourceforge.net/ .IP Thanks to Alexei Drummond, Joseph Heled, Philippe Lemey, .IP Tulio de Oliveira, Beth Shapiro & Marc Suchard .IP Usage: figtree [\-graphic ] [\-width ] [\-height ] [\-help] [] [] .HP \fB\-graphic\fR produce a graphic with the given format .HP \fB\-width\fR the width of the graphic in pixels .HP \fB\-height\fR the height of the graphic in pixels .HP \fB\-help\fR option to print this message .IP Example: figtree test.tree Example: figtree \fB\-graphic\fR PDF test.tree test.pdf Example: figtree \fB\-graphic\fR GIF \fB\-width\fR 320 \fB\-height\fR 320 test.tree test.gif .PP Unrecognized argument: \fB\-\-version\fR .IP FigTree v1.3.1, 2006\-2009 .IP Tree Figure Drawing Tool .IP Andrew Rambaut .IP Institute of Evolutionary Biology .IP University of Edinburgh .IP a.rambaut@ed.ac.uk .IP http://tree.bio.ed.ac.uk/ .IP Uses the Java Evolutionary Biology Library (JEBL) .IP http://jebl.sourceforge.net/ .IP Thanks to Alexei Drummond, Joseph Heled, Philippe Lemey, .IP Tulio de Oliveira, Beth Shapiro & Marc Suchard .IP Usage: figtree [\-graphic ] [\-width ] [\-height ] [\-help] [] [] .HP \fB\-graphic\fR produce a graphic with the given format .HP \fB\-width\fR the width of the graphic in pixels .HP \fB\-height\fR the height of the graphic in pixels .HP \fB\-help\fR option to print this message .IP Example: figtree test.tree Example: figtree \fB\-graphic\fR PDF test.tree test.pdf Example: figtree \fB\-graphic\fR GIF \fB\-width\fR 320 \fB\-height\fR 320 test.tree test.gif .SH "SEE ALSO" The full documentation for .B figtree is maintained as a Texinfo manual. If the .B info and .B figtree programs are properly installed at your site, the command .IP .B info figtree .PP should give you access to the complete manual. debian/figtree.xpm0000644000000000000000000001435211523535041011345 0ustar /* XPM */ static char *figtree[] = { /* columns rows colors chars-per-pixel */ "32 32 256 2", " c #5D3917", ". c #4F393E", "X c #614222", "o c #774E23", "O c #183347", "+ c #223C52", "@ c #323F50", "# c #1F4058", "$ c #244053", "% c #33475F", "& c #1A406D", "* c #2B4964", "= c #32536B", "- c #2F587C", "; c #2F5575", ": c #355770", "> c #375970", ", c #395C7B", "< c #404C58", "1 c #654C4E", "2 c #7B5F4B", "3 c #67515A", "4 c #625251", "5 c #746259", "6 c #6F626E", "7 c #686876", "8 c #6B6C78", "9 c #7D7F77", "0 c #916437", "q c #9E7130", "w c #AC6022", "e c #BC772C", "r c #BF6D35", "t c #AD7137", "y c #BA733E", "u c #C8782C", "i c #866353", "p c #A86B48", "a c #AA724B", "s c #837970", "d c #BF6362", "f c #CD801F", "g c #DD871B", "h c #D88E2D", "j c #D38233", "k c #DB883E", "l c #DF9137", "z c #E79D29", "x c #E69828", "c c #E6983C", "v c #F5A222", "b c #EBAC37", "n c #F6AC37", "m c #E9B13F", "M c #FAB934", "N c #F1B43B", "B c #BC965B", "V c #9F836F", "C c #AB8E73", "Z c #A39C72", "A c #ACA97C", "S c #CD8C45", "D c #E39947", "F c #C0A858", "G c #D4A358", "H c #ECA746", "J c #E0AB45", "K c #EBB04A", "L c #F2BD4C", "P c #EDA951", "I c #EAB953", "U c #D2AF6C", "Y c #C1B16F", "T c #D3A87C", "R c #F3B66C", "E c #E9C661", "W c #2A5383", "Q c #275C9B", "! c #3D5F91", "~ c #3D6689", "^ c #316096", "/ c #3C6C9F", "( c #2760A5", ") c #346AA9", "_ c #2E6EBC", "` c #3271BD", "' c #3B75BB", "] c #4A5F82", "[ c #4D6B8D", "{ c #426D96", "} c #416D98", "| c #4C769D", " . c #4E789E", ".. c #457099", "X. c #5B7C9F", "o. c #51759B", "O. c #646F80", "+. c #617287", "@. c #697F98", "#. c #426FA5", "$. c #456EA8", "%. c #4373A5", "&. c #4A74A2", "*. c #4877AE", "=. c #487AAE", "-. c #577CA4", ";. c #487CBC", ":. c #517FB5", ">. c #2E73C7", ",. c #3173C4", "<. c #3D7FCE", "1. c #3777C5", "2. c #337DD7", "3. c #3C7FD1", "4. c #66829F", "5. c #71899B", "6. c #5780A4", "7. c #5D82A6", "8. c #5E84A8", "9. c #5581B2", "0. c #6485AB", "q. c #6689A5", "w. c #708FAC", "e. c #6C90AF", "r. c #7294AF", "t. c #7599BC", "y. c #7C9DBC", "u. c #7A98B1", "i. c #3A83DB", "p. c #3C82D7", "a. c #3483E3", "s. c #3B8AEB", "d. c #3786E6", "f. c #3B8EF2", "g. c #3D91F6", "h. c #4181CB", "j. c #4D87CC", "k. c #5086C6", "l. c #5789C2", "z. c #548CCF", "x. c #5D93CE", "c. c #498AD7", "v. c #548ED1", "b. c #5290D7", "n. c #5291DB", "m. c #5994D9", "M. c #6795C7", "N. c #6895C6", "B. c #7A9FC2", "V. c #6195D0", "C. c #6398D7", "Z. c #699CD7", "A. c #649ADA", "S. c #6EA2DE", "D. c #468DE3", "F. c #4B91E4", "G. c #4A94ED", "H. c #4E98EF", "J. c #4390ED", "K. c #5393E2", "L. c #5D9AE2", "P. c #599DED", "I. c #5899E6", "U. c #4594F5", "Y. c #4896F4", "T. c #4C99F6", "R. c #4797F8", "E. c #529BF4", "W. c #5A9FF4", "Q. c #57A0F6", "!. c #5FA2F2", "~. c #56A0F8", "^. c #5AA2F8", "/. c #6CA3E2", "(. c #66A4ED", "). c #6AA6EA", "_. c #6EA8EB", "`. c #77ACE7", "'. c #72ABEC", "]. c #7CACE4", "[. c #63A7F7", "{. c #64A8F7", "}. c #6DABF4", "|. c #61A6F8", " X c #65A9F8", ".X c #6BADF9", "XX c #72AEF3", "oX c #70AEF9", "OX c #75B1F6", "+X c #78B3F7", "@X c #73B1F9", "#X c #7AB5FA", "$X c #7EB8FA", "%X c #8A8D93", "&X c #9F9697", "*X c #9EA29C", "=X c #B9B689", "-X c #B8A492", ";X c #AEB593", ":X c #B5BB9E", ">X c #8D98A2", ",X c #859CB4", "XV 7 7.6. .....W UXUXUX", "UXUXUXUXUXUXd.^.E.g.F.4XR g 0 ] 1.K.W.0X%XX.^ } | .~ ~ * UXUXUX", "UXUXUXUXUXUX2.E.W.v.-XT C 8 :.L.[.W.H.,X+.` _ & + = = > O UXUXUX", "UXUXUXUXUXUX>.U.V.O.%X0.j.J.U.f.d.2.@.s % UXUXUXUXUXO # UXUXUXUX", "UXUXUXUXUXUXUXf.D.i.a.d.2.2.>.,.( < q X UXUXUXUXUXUXUXUXUXUXUXUX", "UXUXUXUXUXUXUXa.a.>.,.,.` ,.,.Q UX o UXUXUXUXUXUXUXUXUXUXUXUXUX", "UXUXUXUXUXUXUXUXUXUX` i.i._ UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX", "UXUXUXUXUXUXUXUXUXUXUX,.UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX" }; debian/figtree.examples0000644000000000000000000000004111523553612012351 0ustar examples/* release/common/*.tree