/* * 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); } /** * 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