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