2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.jbappletgui;
\r
22 import java.awt.event.*;
\r
25 public class GTreePanel extends Frame {
\r
26 BorderLayout borderLayout1 = new BorderLayout();
\r
27 protected ScrollPane scrollPane = new ScrollPane();
\r
28 MenuBar jMenuBar1 = new MenuBar();
\r
29 Menu jMenu2 = new Menu();
\r
30 protected MenuItem fontSize = new MenuItem();
\r
31 protected CheckboxMenuItem bootstrapMenu = new CheckboxMenuItem();
\r
32 protected CheckboxMenuItem distanceMenu = new CheckboxMenuItem();
\r
33 protected CheckboxMenuItem placeholdersMenu = new CheckboxMenuItem();
\r
34 protected CheckboxMenuItem fitToWindow = new CheckboxMenuItem();
\r
35 Menu fileMenu = new Menu();
\r
36 MenuItem newickOutput = new MenuItem();
\r
38 public GTreePanel() {
\r
41 this.setMenuBar(jMenuBar1);
\r
42 } catch (Exception e) {
\r
43 e.printStackTrace();
\r
47 private void jbInit() throws Exception {
\r
48 setLayout(borderLayout1);
\r
49 this.setBackground(Color.white);
\r
50 this.setFont(new java.awt.Font("Verdana", 0, 12));
\r
51 jMenu2.setLabel("View");
\r
52 fontSize.setLabel("Font Size - 12");
\r
53 fontSize.addActionListener(new java.awt.event.ActionListener() {
\r
54 public void actionPerformed(ActionEvent e) {
\r
55 fontSize_actionPerformed(e);
\r
58 bootstrapMenu.setLabel("Show Bootstrap Values");
\r
59 bootstrapMenu.addItemListener(new java.awt.event.ItemListener() {
\r
60 public void itemStateChanged(ItemEvent e) {
\r
61 bootstrapMenu_actionPerformed(null);
\r
64 distanceMenu.setLabel("Show Distances");
\r
65 distanceMenu.addItemListener(new java.awt.event.ItemListener() {
\r
66 public void itemStateChanged(ItemEvent e) {
\r
67 distanceMenu_actionPerformed(null);
\r
70 placeholdersMenu.setLabel("Mark Unassociated Leaves");
\r
71 placeholdersMenu.addItemListener(new java.awt.event.ItemListener() {
\r
72 public void itemStateChanged(ItemEvent e) {
\r
73 placeholdersMenu_actionPerformed(null);
\r
76 fitToWindow.setState(true);
\r
77 fitToWindow.setLabel("Fit To Window");
\r
78 fitToWindow.addItemListener(new java.awt.event.ItemListener() {
\r
79 public void itemStateChanged(ItemEvent e) {
\r
80 fitToWindow_actionPerformed(null);
\r
83 fileMenu.setLabel("File");
\r
84 newickOutput.setLabel("Newick Format");
\r
85 newickOutput.addActionListener(new ActionListener() {
\r
86 public void actionPerformed(ActionEvent actionEvent) {
\r
87 newickOutput_actionPerformed(actionEvent);
\r
90 add(scrollPane, BorderLayout.CENTER);
\r
91 jMenuBar1.add(fileMenu);
\r
92 jMenuBar1.add(jMenu2);
\r
93 jMenu2.add(fitToWindow);
\r
94 jMenu2.add(fontSize);
\r
95 jMenu2.add(distanceMenu);
\r
96 jMenu2.add(bootstrapMenu);
\r
97 jMenu2.add(placeholdersMenu);
\r
98 fileMenu.add(newickOutput);
\r
101 protected void printMenu_actionPerformed(ActionEvent e) {
\r
104 protected void fontSize_actionPerformed(ActionEvent e) {
\r
107 protected void distanceMenu_actionPerformed(ActionEvent e) {
\r
110 protected void bootstrapMenu_actionPerformed(ActionEvent e) {
\r
113 protected void placeholdersMenu_actionPerformed(ActionEvent e) {
\r
116 protected void fitToWindow_actionPerformed(ActionEvent e) {
\r
119 public void newickOutput_actionPerformed(ActionEvent actionEvent) {
\r