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.jbgui;
\r
22 import java.awt.event.*;
\r
23 import javax.swing.*;
\r
25 public class GTreePanel
\r
26 extends JInternalFrame
\r
28 BorderLayout borderLayout1 = new BorderLayout();
\r
29 public JScrollPane scrollPane = new JScrollPane();
\r
30 JMenuBar jMenuBar1 = new JMenuBar();
\r
31 JMenu jMenu1 = new JMenu();
\r
32 JMenuItem saveAsNewick = new JMenuItem();
\r
33 JMenuItem printMenu = new JMenuItem();
\r
34 JMenu jMenu2 = new JMenu();
\r
35 public JMenuItem font = new JMenuItem();
\r
36 public JCheckBoxMenuItem bootstrapMenu = new JCheckBoxMenuItem();
\r
37 public JCheckBoxMenuItem distanceMenu = new JCheckBoxMenuItem();
\r
38 public JCheckBoxMenuItem fitToWindow = new JCheckBoxMenuItem();
\r
39 public JCheckBoxMenuItem placeholdersMenu = new JCheckBoxMenuItem();
\r
40 JMenuItem pngTree = new JMenuItem();
\r
41 JMenuItem epsTree = new JMenuItem();
\r
42 JMenu saveAsMenu = new JMenu();
\r
43 JMenuItem textbox = new JMenuItem();
\r
44 protected JCheckBoxMenuItem fullid = new JCheckBoxMenuItem();
\r
51 this.setJMenuBar(jMenuBar1);
\r
55 e.printStackTrace();
\r
59 private void jbInit()
\r
62 this.getContentPane().setLayout(borderLayout1);
\r
63 this.setBackground(Color.white);
\r
64 this.setFont(new java.awt.Font("Verdana", 0, 12));
\r
65 scrollPane.setOpaque(false);
\r
66 jMenu1.setText("File");
\r
67 saveAsNewick.setText("Newick Format");
\r
68 saveAsNewick.addActionListener(new ActionListener()
\r
70 public void actionPerformed(ActionEvent e)
\r
72 saveAsNewick_actionPerformed(e);
\r
75 printMenu.setText("Print");
\r
76 printMenu.addActionListener(new java.awt.event.ActionListener()
\r
78 public void actionPerformed(ActionEvent e)
\r
80 printMenu_actionPerformed(e);
\r
83 jMenu2.setText("View");
\r
84 font.setText("Font...");
\r
85 font.addActionListener(new java.awt.event.ActionListener()
\r
87 public void actionPerformed(ActionEvent e)
\r
89 font_actionPerformed(e);
\r
92 bootstrapMenu.setText("Show Bootstrap Values");
\r
93 bootstrapMenu.addActionListener(new java.awt.event.ActionListener()
\r
95 public void actionPerformed(ActionEvent e)
\r
97 bootstrapMenu_actionPerformed(e);
\r
100 distanceMenu.setText("Show Distances");
\r
101 distanceMenu.addActionListener(new java.awt.event.ActionListener()
\r
103 public void actionPerformed(ActionEvent e)
\r
105 distanceMenu_actionPerformed(e);
\r
108 fitToWindow.setSelected(true);
\r
109 fitToWindow.setText("Fit To Window");
\r
110 fitToWindow.addActionListener(new java.awt.event.ActionListener()
\r
112 public void actionPerformed(ActionEvent e)
\r
114 fitToWindow_actionPerformed(e);
\r
117 epsTree.setText("EPS");
\r
118 epsTree.addActionListener(new java.awt.event.ActionListener()
\r
120 public void actionPerformed(ActionEvent e)
\r
122 epsTree_actionPerformed(e);
\r
125 pngTree.setText("PNG");
\r
126 pngTree.addActionListener(new java.awt.event.ActionListener()
\r
128 public void actionPerformed(ActionEvent e)
\r
130 pngTree_actionPerformed(e);
\r
133 saveAsMenu.setText("Save as");
\r
134 placeholdersMenu.setToolTipText(
\r
135 "Marks leaves of tree not associated with a sequence");
\r
136 placeholdersMenu.setText("Mark Unlinked Leaves");
\r
137 placeholdersMenu.addActionListener(new ActionListener()
\r
139 public void actionPerformed(ActionEvent e)
\r
141 placeholdersMenu_actionPerformed(e);
\r
144 textbox.setText("Output to Textbox...");
\r
145 textbox.addActionListener(new ActionListener()
\r
147 public void actionPerformed(ActionEvent e)
\r
149 textbox_actionPerformed(e);
\r
152 fullid.setText("Show Full Sequence Id");
\r
153 fullid.addActionListener(new ActionListener()
\r
155 public void actionPerformed(ActionEvent e)
\r
157 fullid_actionPerformed(e);
\r
160 this.getContentPane().add(scrollPane, BorderLayout.CENTER);
\r
161 jMenuBar1.add(jMenu1);
\r
162 jMenuBar1.add(jMenu2);
\r
163 jMenu1.add(saveAsMenu);
\r
164 jMenu1.add(textbox);
\r
165 jMenu1.add(printMenu);
\r
166 jMenu2.add(fitToWindow);
\r
168 jMenu2.add(distanceMenu);
\r
169 jMenu2.add(bootstrapMenu);
\r
170 jMenu2.add(placeholdersMenu);
\r
171 jMenu2.add(fullid);
\r
172 saveAsMenu.add(saveAsNewick);
\r
173 saveAsMenu.add(epsTree);
\r
174 saveAsMenu.add(pngTree);
\r
177 public void printMenu_actionPerformed(ActionEvent e)
\r
181 public void font_actionPerformed(ActionEvent e)
\r
185 public void distanceMenu_actionPerformed(ActionEvent e)
\r
189 public void bootstrapMenu_actionPerformed(ActionEvent e)
\r
193 public void fitToWindow_actionPerformed(ActionEvent e)
\r
197 public void pngTree_actionPerformed(ActionEvent e)
\r
201 public void epsTree_actionPerformed(ActionEvent e)
\r
205 public void saveAsNewick_actionPerformed(ActionEvent e)
\r
209 public void placeholdersMenu_actionPerformed(ActionEvent e)
\r
213 public void textbox_actionPerformed(ActionEvent e)
\r
217 public void fullid_actionPerformed(ActionEvent e)
\r