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 fontSize = 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
50 this.setJMenuBar(jMenuBar1);
\r
54 e.printStackTrace();
\r
58 private void jbInit()
\r
61 this.getContentPane().setLayout(borderLayout1);
\r
62 this.setBackground(Color.white);
\r
63 this.setFont(new java.awt.Font("Verdana", 0, 12));
\r
64 scrollPane.setOpaque(false);
\r
65 jMenu1.setText("File");
\r
66 saveAsNewick.setText("Newick Format");
\r
67 saveAsNewick.addActionListener(new ActionListener()
\r
69 public void actionPerformed(ActionEvent e)
\r
71 saveAsNewick_actionPerformed(e);
\r
74 printMenu.setText("Print");
\r
75 printMenu.addActionListener(new java.awt.event.ActionListener()
\r
77 public void actionPerformed(ActionEvent e)
\r
79 printMenu_actionPerformed(e);
\r
82 jMenu2.setText("View");
\r
83 fontSize.setText("Font Size - 12");
\r
84 fontSize.addActionListener(new java.awt.event.ActionListener()
\r
86 public void actionPerformed(ActionEvent e)
\r
88 fontSize_actionPerformed(e);
\r
91 bootstrapMenu.setText("Show Bootstrap Values");
\r
92 bootstrapMenu.addActionListener(new java.awt.event.ActionListener()
\r
94 public void actionPerformed(ActionEvent e)
\r
96 bootstrapMenu_actionPerformed(e);
\r
99 distanceMenu.setText("Show Distances");
\r
100 distanceMenu.addActionListener(new java.awt.event.ActionListener()
\r
102 public void actionPerformed(ActionEvent e)
\r
104 distanceMenu_actionPerformed(e);
\r
107 fitToWindow.setSelected(true);
\r
108 fitToWindow.setText("Fit To Window");
\r
109 fitToWindow.addActionListener(new java.awt.event.ActionListener()
\r
111 public void actionPerformed(ActionEvent e)
\r
113 fitToWindow_actionPerformed(e);
\r
116 epsTree.setText("EPS");
\r
117 epsTree.addActionListener(new java.awt.event.ActionListener()
\r
119 public void actionPerformed(ActionEvent e)
\r
121 epsTree_actionPerformed(e);
\r
124 pngTree.setText("PNG");
\r
125 pngTree.addActionListener(new java.awt.event.ActionListener()
\r
127 public void actionPerformed(ActionEvent e)
\r
129 pngTree_actionPerformed(e);
\r
132 saveAsMenu.setText("Save as");
\r
133 placeholdersMenu.setToolTipText(
\r
134 "Marks leaves of tree not associated with a sequence");
\r
135 placeholdersMenu.setText("Mark Unlinked Leaves");
\r
136 placeholdersMenu.addActionListener(new ActionListener()
\r
138 public void actionPerformed(ActionEvent e)
\r
140 placeholdersMenu_actionPerformed(e);
\r
143 textbox.setText("Output to Textbox...");
\r
144 textbox.addActionListener(new ActionListener()
\r
146 public void actionPerformed(ActionEvent e)
\r
148 textbox_actionPerformed(e);
\r
151 this.getContentPane().add(scrollPane, BorderLayout.CENTER);
\r
152 jMenuBar1.add(jMenu1);
\r
153 jMenuBar1.add(jMenu2);
\r
154 jMenu1.add(saveAsMenu);
\r
155 jMenu1.add(textbox);
\r
156 jMenu1.add(printMenu);
\r
157 jMenu2.add(fitToWindow);
\r
158 jMenu2.add(fontSize);
\r
159 jMenu2.add(distanceMenu);
\r
160 jMenu2.add(bootstrapMenu);
\r
161 jMenu2.add(placeholdersMenu);
\r
162 saveAsMenu.add(saveAsNewick);
\r
163 saveAsMenu.add(epsTree);
\r
164 saveAsMenu.add(pngTree);
\r
167 public void printMenu_actionPerformed(ActionEvent e)
\r
171 public void fontSize_actionPerformed(ActionEvent e)
\r
175 public void distanceMenu_actionPerformed(ActionEvent e)
\r
179 public void bootstrapMenu_actionPerformed(ActionEvent e)
\r
183 public void fitToWindow_actionPerformed(ActionEvent e)
\r
187 public void pngTree_actionPerformed(ActionEvent e)
\r
191 public void epsTree_actionPerformed(ActionEvent e)
\r
195 public void saveAsNewick_actionPerformed(ActionEvent e)
\r
199 public void placeholdersMenu_actionPerformed(ActionEvent e)
\r
203 public void textbox_actionPerformed(ActionEvent e)
\r