[med-svn] r5927 - in trunk/packages/figtree/trunk/debian: . patches
Andreas Tille
tille at alioth.debian.org
Mon Feb 7 22:06:57 UTC 2011
Author: tille
Date: 2011-02-07 22:06:51 +0000 (Mon, 07 Feb 2011)
New Revision: 5927
Added:
trunk/packages/figtree/trunk/debian/patches/ignore_quaqua.patch
trunk/packages/figtree/trunk/debian/patches/remove_webui.patch
Modified:
trunk/packages/figtree/trunk/debian/get-orig-source
trunk/packages/figtree/trunk/debian/patches/series
Log:
Remove webgui and lib/jwt/*.jar finally because it is not needed.
Modified: trunk/packages/figtree/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/figtree/trunk/debian/get-orig-source 2011-02-07 21:46:23 UTC (rev 5926)
+++ trunk/packages/figtree/trunk/debian/get-orig-source 2011-02-07 22:06:51 UTC (rev 5927)
@@ -38,16 +38,16 @@
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/commons-fileupload-1.2.1.jar \
- jwt/commons-io-1.4.jar \
- libquaqua.jnilib \
- jdom.jar \
- swing-layout.jar \
- quaqua-filechooser-only.jar \
- quaqua-colorchooser-only.jar \
- quaqua.jar \
+for jar in \
+ jwt/ \
+ libquaqua.jnilib \
+ jdom.jar \
+ swing-layout.jar \
+ quaqua-filechooser-only.jar \
+ quaqua-colorchooser-only.jar \
+ quaqua.jar \
; do
- rm -f lib/$jar
+ rm -rf lib/$jar
done
cd ..
Added: trunk/packages/figtree/trunk/debian/patches/ignore_quaqua.patch
===================================================================
--- trunk/packages/figtree/trunk/debian/patches/ignore_quaqua.patch (rev 0)
+++ trunk/packages/figtree/trunk/debian/patches/ignore_quaqua.patch 2011-02-07 22:06:51 UTC (rev 5927)
@@ -0,0 +1,148 @@
+Author: Andreas Tille <tille at debian.org>
+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.
+
+--- figtree-1.3.1.orig/src/figtree/application/FigTreeApplication.java
++++ figtree-1.3.1/src/figtree/application/FigTreeApplication.java
+@@ -29,7 +29,6 @@
+ import java.util.*;
+ import java.util.List;
+
+-//import ch.randelshofer.quaqua.QuaquaManager;
+ import jebl.evolution.io.ImportException;
+ import jebl.evolution.io.NewickImporter;
+ import jebl.evolution.trees.Tree;
+@@ -37,8 +36,6 @@
+
+ import javax.swing.*;
+
+-import ch.randelshofer.quaqua.QuaquaManager;
+-
+ public class FigTreeApplication extends MultiDocApplication {
+
+ public static final String VERSION = "1.3.1";
+@@ -303,34 +300,6 @@
+ System.setProperty("apple.awt.showGrowBox","true");
+ System.setProperty("apple.awt.graphics.UseQuartz","true");
+
+- // set the Quaqua Look and Feel in the UIManager
+- 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) {
+- }
+-
+ UIManager.put("SystemFont", new Font("Lucida Grande", Font.PLAIN, 13));
+ UIManager.put("SmallSystemFont", new Font("Lucida Grande", Font.PLAIN, 11));
+ }
+@@ -389,4 +358,4 @@
+ }
+ }
+
+-}
+\ No newline at end of file
++}
+--- figtree-1.3.1.orig/src/figtree/treeviewer/TreeViewerController.java
++++ figtree-1.3.1/src/figtree/treeviewer/TreeViewerController.java
+@@ -85,13 +85,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();
+--- figtree-1.3.1.orig/src/figtree/application/FigTreeFrame.java
++++ figtree-1.3.1/src/figtree/application/FigTreeFrame.java
+@@ -183,7 +183,6 @@
+ // treeViewer.showStatistics();
+ // }
+ // });
+-// settingsToolButton.putClientProperty("Quaqua.Button.style", "toolBarRollover");
+ // toolBar.addComponent(settingsToolButton);
+ // settingsToolButton.setEnabled(false);
+
+@@ -194,19 +193,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);
+@@ -252,7 +248,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) {
+@@ -264,7 +259,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);
+@@ -1597,4 +1591,4 @@
+ private AnnotationDialog annotationDialog = null;
+ private AnnotationDialog copyAnnotationDialog = null;
+ private SelectAnnotationDialog selectAnnotationDialog = null;
+-}
+\ No newline at end of file
++}
+--- figtree-1.3.1.orig/src/figtree/treeviewer/ControllerOptionsPanel.java
++++ figtree-1.3.1/src/figtree/treeviewer/ControllerOptionsPanel.java
+@@ -24,7 +24,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);
Added: trunk/packages/figtree/trunk/debian/patches/remove_webui.patch
===================================================================
--- trunk/packages/figtree/trunk/debian/patches/remove_webui.patch (rev 0)
+++ trunk/packages/figtree/trunk/debian/patches/remove_webui.patch 2011-02-07 22:06:51 UTC (rev 5927)
@@ -0,0 +1,520 @@
+Author: Andreas Tille <tille at debian.org>
+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
+
+--- figtree-1.3.1.orig/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<String>() {
+- @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<Integer>() {
+- @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<Double>() {
+- @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<Double>() {
+- @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<Tree> trees = new ArrayList<Tree>();
+-
+- 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;
+- }
+-}
+--- figtree-1.3.1.orig/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<String> fileUploaded = new Signal1<String>();
+- 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: <i>" + fileUpload.getClientFileName() + "</i>");
+- fileUploaded.trigger(fileUpload.getSpoolFileName());
+-
+- fileUpload.remove();
+- createUpload();
+- }
+-
+- public Signal1<String> fileUploaded() {
+- return fileUploaded;
+- }
+-}
+--- figtree-1.3.1.orig/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);
+- }
+-
+-}
+--- figtree-1.3.1.orig/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<WMouseEvent>() {
+- @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<WMouseEvent>() {
+- @Override
+- public void trigger(WMouseEvent event) {
+- selector.mousePressed(convertMouseEvent(event, MouseEvent.MOUSE_PRESSED));
+- }
+- });
+-
+- mouseWentUp().addListener(this, new Signal1.Listener<WMouseEvent>() {
+- @Override
+- public void trigger(WMouseEvent event) {
+- selector.mouseReleased(convertMouseEvent(event, MouseEvent.MOUSE_RELEASED));
+- }
+- });
+-
+- mouseDragged().addListener(this, new Signal1.Listener<WMouseEvent>() {
+- @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;
+- }
+-}
Modified: trunk/packages/figtree/trunk/debian/patches/series
===================================================================
--- trunk/packages/figtree/trunk/debian/patches/series 2011-02-07 21:46:23 UTC (rev 5926)
+++ trunk/packages/figtree/trunk/debian/patches/series 2011-02-07 22:06:51 UTC (rev 5927)
@@ -1,2 +1,3 @@
build_figtree_gui_only.patch
ignore_quaqua.patch
+remove_webui.patch
More information about the debian-med-commit
mailing list