elementAt instead of get for 1.1 compatibility
[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 JMenuItem originalSeqData = new JMenuItem();\r
45   public GTreePanel()\r
46   {\r
47     try\r
48     {\r
49       jbInit();\r
50       this.setJMenuBar(jMenuBar1);\r
51     }\r
52     catch (Exception e)\r
53     {\r
54       e.printStackTrace();\r
55     }\r
56   }\r
57 \r
58   private void jbInit()\r
59       throws Exception\r
60   {\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
68     {\r
69       public void actionPerformed(ActionEvent e)\r
70       {\r
71         saveAsNewick_actionPerformed(e);\r
72       }\r
73     });\r
74     printMenu.setText("Print");\r
75     printMenu.addActionListener(new java.awt.event.ActionListener()\r
76     {\r
77       public void actionPerformed(ActionEvent e)\r
78       {\r
79         printMenu_actionPerformed(e);\r
80       }\r
81     });\r
82     jMenu2.setText("View");\r
83     font.setText("Font...");\r
84     font.addActionListener(new java.awt.event.ActionListener()\r
85     {\r
86       public void actionPerformed(ActionEvent e)\r
87       {\r
88         font_actionPerformed(e);\r
89       }\r
90     });\r
91     bootstrapMenu.setText("Show Bootstrap Values");\r
92     bootstrapMenu.addActionListener(new java.awt.event.ActionListener()\r
93     {\r
94       public void actionPerformed(ActionEvent e)\r
95       {\r
96         bootstrapMenu_actionPerformed(e);\r
97       }\r
98     });\r
99     distanceMenu.setText("Show Distances");\r
100     distanceMenu.addActionListener(new java.awt.event.ActionListener()\r
101     {\r
102       public void actionPerformed(ActionEvent e)\r
103       {\r
104         distanceMenu_actionPerformed(e);\r
105       }\r
106     });\r
107     fitToWindow.setSelected(true);\r
108     fitToWindow.setText("Fit To Window");\r
109     fitToWindow.addActionListener(new java.awt.event.ActionListener()\r
110     {\r
111       public void actionPerformed(ActionEvent e)\r
112       {\r
113         fitToWindow_actionPerformed(e);\r
114       }\r
115     });\r
116     epsTree.setText("EPS");\r
117     epsTree.addActionListener(new java.awt.event.ActionListener()\r
118     {\r
119       public void actionPerformed(ActionEvent e)\r
120       {\r
121         epsTree_actionPerformed(e);\r
122       }\r
123     });\r
124     pngTree.setText("PNG");\r
125     pngTree.addActionListener(new java.awt.event.ActionListener()\r
126     {\r
127       public void actionPerformed(ActionEvent e)\r
128       {\r
129         pngTree_actionPerformed(e);\r
130       }\r
131     });\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
137     {\r
138       public void actionPerformed(ActionEvent e)\r
139       {\r
140         placeholdersMenu_actionPerformed(e);\r
141       }\r
142     });\r
143     textbox.setText("Output to Textbox...");\r
144     textbox.addActionListener(new ActionListener()\r
145     {\r
146       public void actionPerformed(ActionEvent e)\r
147       {\r
148         textbox_actionPerformed(e);\r
149       }\r
150     });\r
151     originalSeqData.setText("Input Data...");\r
152     originalSeqData.addActionListener(new ActionListener()\r
153     {\r
154       public void actionPerformed(ActionEvent e)\r
155       {\r
156         originalSeqData_actionPerformed(e);\r
157       }\r
158     });\r
159     this.getContentPane().add(scrollPane, BorderLayout.CENTER);\r
160     jMenuBar1.add(jMenu1);\r
161     jMenuBar1.add(jMenu2);\r
162     jMenu1.add(saveAsMenu);\r
163     jMenu1.add(textbox);\r
164     jMenu1.add(printMenu);\r
165     jMenu1.add(originalSeqData);\r
166     jMenu2.add(fitToWindow);\r
167     jMenu2.add(font);\r
168     jMenu2.add(distanceMenu);\r
169     jMenu2.add(bootstrapMenu);\r
170     jMenu2.add(placeholdersMenu);\r
171     saveAsMenu.add(saveAsNewick);\r
172     saveAsMenu.add(epsTree);\r
173     saveAsMenu.add(pngTree);\r
174   }\r
175 \r
176   public void printMenu_actionPerformed(ActionEvent e)\r
177   {\r
178   }\r
179 \r
180   public void font_actionPerformed(ActionEvent e)\r
181   {\r
182   }\r
183 \r
184   public void distanceMenu_actionPerformed(ActionEvent e)\r
185   {\r
186   }\r
187 \r
188   public void bootstrapMenu_actionPerformed(ActionEvent e)\r
189   {\r
190   }\r
191 \r
192   public void fitToWindow_actionPerformed(ActionEvent e)\r
193   {\r
194   }\r
195 \r
196   public void pngTree_actionPerformed(ActionEvent e)\r
197   {\r
198   }\r
199 \r
200   public void epsTree_actionPerformed(ActionEvent e)\r
201   {\r
202   }\r
203 \r
204   public void saveAsNewick_actionPerformed(ActionEvent e)\r
205   {\r
206   }\r
207 \r
208   public void placeholdersMenu_actionPerformed(ActionEvent e)\r
209   {\r
210   }\r
211 \r
212   public void textbox_actionPerformed(ActionEvent e)\r
213   {\r
214   }\r
215 \r
216   public void fullid_actionPerformed(ActionEvent e)\r
217   {\r
218 \r
219   }\r
220 \r
221   public void originalSeqData_actionPerformed(ActionEvent e)\r
222   {\r
223 \r
224   }\r
225 }\r