X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FTreePanel.java;h=735a11bfd94be34941cf7809d9c559289ee194b1;hb=08598b6cbefd6e268c20f7e5ca9785dd5e243a08;hp=51ec4a0a0e27fa9e256225acf0c79e659009f88b;hpb=8a5c39442bced20fc95272efe6d3176719ca3f15;p=jalview.git diff --git a/src/jalview/appletgui/TreePanel.java b/src/jalview/appletgui/TreePanel.java index 51ec4a0..735a11b 100755 --- a/src/jalview/appletgui/TreePanel.java +++ b/src/jalview/appletgui/TreePanel.java @@ -1,201 +1,364 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle - * - * 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 program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -package jalview.appletgui; - -import java.util.*; - -import java.awt.event.*; - -import jalview.analysis.*; -import jalview.datamodel.*; -import jalview.io.*; -import jalview.jbappletgui.*; - -public class TreePanel - extends GTreePanel -{ - SequenceI[] seq; - String type; - String pwtype; - AlignmentPanel ap; - int start; - int end; - TreeCanvas treeCanvas; - NJTree tree; - - public NJTree getTree() - { - return tree; - } - - /** - * Creates a new TreePanel object. - * - * @param av DOCUMENT ME! - * @param seqVector DOCUMENT ME! - * @param type DOCUMENT ME! - * @param pwtype DOCUMENT ME! - * @param s DOCUMENT ME! - * @param e DOCUMENT ME! - */ - public TreePanel(AlignViewport av, Vector seqVector, String type, - String pwtype, int s, int e) - { - super(); - initTreePanel(av, seqVector, type, pwtype, s, e, null); - - // We know this tree has distances. JBPNote TODO: prolly should add this as a userdefined default - treeCanvas.setShowDistances(true); - } - - /** - * Creates a new TreePanel object. - * - * @param av DOCUMENT ME! - * @param seqVector DOCUMENT ME! - * @param newtree DOCUMENT ME! - * @param type DOCUMENT ME! - * @param pwtype DOCUMENT ME! - */ - public TreePanel(AlignViewport av, Vector seqVector, NewickFile newtree, - String type, String pwtype) - { - super(); - initTreePanel(av, seqVector, type, pwtype, 0, seqVector.size(), newtree); - } - - - void initTreePanel(AlignViewport av, Vector seqVector, String type, - String pwtype, int s, int e, NewickFile newTree) - { - - this.type = type; - this.pwtype = pwtype; - - start = s; - end = e; - - seq = new Sequence[seqVector.size()]; - for(int i=0; i