Forces init of alignPanel if annotations added
[jalview.git] / src / jalview / jbgui / GTreePanel.java
1 /*\r
2  * Jalview - A Sequence Alignment Editor and Viewer\r
3  * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4  *\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
9  *\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
14  *\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
18  */\r
19 package jalview.jbgui;\r
20 \r
21 import java.awt.*;\r
22 import java.awt.event.*;\r
23 import javax.swing.*;\r
24 \r
25 public class GTreePanel\r
26     extends JInternalFrame\r
27 {\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   public GTreePanel()\r
45   {\r
46     try\r
47     {\r
48       jbInit();\r
49       this.setJMenuBar(jMenuBar1);\r
50     }\r
51     catch (Exception e)\r
52     {\r
53       e.printStackTrace();\r
54     }\r
55   }\r
56 \r
57   private void jbInit()\r
58       throws Exception\r
59   {\r
60     this.getContentPane().setLayout(borderLayout1);\r
61     this.setBackground(Color.white);\r
62     this.setFont(new java.awt.Font("Verdana", 0, 12));\r
63     scrollPane.setOpaque(false);\r
64     jMenu1.setText("File");\r
65     saveAsNewick.setText("Newick Format");\r
66     saveAsNewick.addActionListener(new ActionListener()\r
67     {\r
68       public void actionPerformed(ActionEvent e)\r
69       {\r
70         saveAsNewick_actionPerformed(e);\r
71       }\r
72     });\r
73     printMenu.setText("Print");\r
74     printMenu.addActionListener(new java.awt.event.ActionListener()\r
75     {\r
76       public void actionPerformed(ActionEvent e)\r
77       {\r
78         printMenu_actionPerformed(e);\r
79       }\r
80     });\r
81     jMenu2.setText("View");\r
82     font.setText("Font...");\r
83     font.addActionListener(new java.awt.event.ActionListener()\r
84     {\r
85       public void actionPerformed(ActionEvent e)\r
86       {\r
87         font_actionPerformed(e);\r
88       }\r
89     });\r
90     bootstrapMenu.setText("Show Bootstrap Values");\r
91     bootstrapMenu.addActionListener(new java.awt.event.ActionListener()\r
92     {\r
93       public void actionPerformed(ActionEvent e)\r
94       {\r
95         bootstrapMenu_actionPerformed(e);\r
96       }\r
97     });\r
98     distanceMenu.setText("Show Distances");\r
99     distanceMenu.addActionListener(new java.awt.event.ActionListener()\r
100     {\r
101       public void actionPerformed(ActionEvent e)\r
102       {\r
103         distanceMenu_actionPerformed(e);\r
104       }\r
105     });\r
106     fitToWindow.setSelected(true);\r
107     fitToWindow.setText("Fit To Window");\r
108     fitToWindow.addActionListener(new java.awt.event.ActionListener()\r
109     {\r
110       public void actionPerformed(ActionEvent e)\r
111       {\r
112         fitToWindow_actionPerformed(e);\r
113       }\r
114     });\r
115     epsTree.setText("EPS");\r
116     epsTree.addActionListener(new java.awt.event.ActionListener()\r
117     {\r
118       public void actionPerformed(ActionEvent e)\r
119       {\r
120         epsTree_actionPerformed(e);\r
121       }\r
122     });\r
123     pngTree.setText("PNG");\r
124     pngTree.addActionListener(new java.awt.event.ActionListener()\r
125     {\r
126       public void actionPerformed(ActionEvent e)\r
127       {\r
128         pngTree_actionPerformed(e);\r
129       }\r
130     });\r
131     saveAsMenu.setText("Save as");\r
132     placeholdersMenu.setToolTipText(\r
133         "Marks leaves of tree not associated with a sequence");\r
134     placeholdersMenu.setText("Mark Unlinked Leaves");\r
135     placeholdersMenu.addActionListener(new ActionListener()\r
136     {\r
137       public void actionPerformed(ActionEvent e)\r
138       {\r
139         placeholdersMenu_actionPerformed(e);\r
140       }\r
141     });\r
142     textbox.setText("Output to Textbox...");\r
143     textbox.addActionListener(new ActionListener()\r
144     {\r
145       public void actionPerformed(ActionEvent e)\r
146       {\r
147         textbox_actionPerformed(e);\r
148       }\r
149     });\r
150     this.getContentPane().add(scrollPane, BorderLayout.CENTER);\r
151     jMenuBar1.add(jMenu1);\r
152     jMenuBar1.add(jMenu2);\r
153     jMenu1.add(saveAsMenu);\r
154     jMenu1.add(textbox);\r
155     jMenu1.add(printMenu);\r
156     jMenu2.add(fitToWindow);\r
157     jMenu2.add(font);\r
158     jMenu2.add(distanceMenu);\r
159     jMenu2.add(bootstrapMenu);\r
160     jMenu2.add(placeholdersMenu);\r
161     saveAsMenu.add(saveAsNewick);\r
162     saveAsMenu.add(epsTree);\r
163     saveAsMenu.add(pngTree);\r
164   }\r
165 \r
166   public void printMenu_actionPerformed(ActionEvent e)\r
167   {\r
168   }\r
169 \r
170   public void font_actionPerformed(ActionEvent e)\r
171   {\r
172   }\r
173 \r
174   public void distanceMenu_actionPerformed(ActionEvent e)\r
175   {\r
176   }\r
177 \r
178   public void bootstrapMenu_actionPerformed(ActionEvent e)\r
179   {\r
180   }\r
181 \r
182   public void fitToWindow_actionPerformed(ActionEvent e)\r
183   {\r
184   }\r
185 \r
186   public void pngTree_actionPerformed(ActionEvent e)\r
187   {\r
188   }\r
189 \r
190   public void epsTree_actionPerformed(ActionEvent e)\r
191   {\r
192   }\r
193 \r
194   public void saveAsNewick_actionPerformed(ActionEvent e)\r
195   {\r
196   }\r
197 \r
198   public void placeholdersMenu_actionPerformed(ActionEvent e)\r
199   {\r
200   }\r
201 \r
202   public void textbox_actionPerformed(ActionEvent e)\r
203   {\r
204   }\r
205 \r
206   public void fullid_actionPerformed(ActionEvent e)\r
207   {\r
208 \r
209   }\r
210 }\r