JAL-1503 update version in GPL header
[jalview.git] / src / jalview / jbgui / GTreePanel.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.jbgui;
20
21 import jalview.util.MessageManager;
22
23 import java.awt.*;
24 import java.awt.event.*;
25 import javax.swing.*;
26 import javax.swing.event.*;
27
28 public class GTreePanel extends JInternalFrame
29 {
30   BorderLayout borderLayout1 = new BorderLayout();
31
32   public JScrollPane scrollPane = new JScrollPane();
33
34   JMenuBar jMenuBar1 = new JMenuBar();
35
36   JMenu fileMenu = new JMenu();
37
38   JMenuItem saveAsNewick = new JMenuItem();
39
40   JMenuItem printMenu = new JMenuItem();
41
42   protected JMenu viewMenu = new JMenu();
43
44   public JMenuItem font = new JMenuItem();
45
46   public JMenuItem sortAssocViews = new JMenuItem();
47
48   public JCheckBoxMenuItem bootstrapMenu = new JCheckBoxMenuItem();
49
50   public JCheckBoxMenuItem distanceMenu = new JCheckBoxMenuItem();
51
52   public JCheckBoxMenuItem fitToWindow = new JCheckBoxMenuItem();
53
54   public JCheckBoxMenuItem placeholdersMenu = new JCheckBoxMenuItem();
55
56   JMenuItem pngTree = new JMenuItem();
57
58   JMenuItem epsTree = new JMenuItem();
59
60   JMenu saveAsMenu = new JMenu();
61
62   JMenuItem textbox = new JMenuItem();
63
64   public JMenuItem originalSeqData = new JMenuItem();
65
66   protected JMenu associateLeavesMenu = new JMenu();
67
68   public GTreePanel()
69   {
70     try
71     {
72       jbInit();
73       this.setJMenuBar(jMenuBar1);
74     } catch (Exception e)
75     {
76       e.printStackTrace();
77     }
78   }
79
80   private void jbInit() throws Exception
81   {
82     this.getContentPane().setLayout(borderLayout1);
83     this.setBackground(Color.white);
84     this.setFont(new java.awt.Font("Verdana", 0, 12));
85     scrollPane.setOpaque(false);
86     fileMenu.setText(MessageManager.getString("action.file"));
87     saveAsNewick.setText(MessageManager.getString("label.newick_format"));
88     saveAsNewick.addActionListener(new ActionListener()
89     {
90       public void actionPerformed(ActionEvent e)
91       {
92         saveAsNewick_actionPerformed(e);
93       }
94     });
95     printMenu.setText(MessageManager.getString("action.print"));
96     printMenu.addActionListener(new java.awt.event.ActionListener()
97     {
98       public void actionPerformed(ActionEvent e)
99       {
100         printMenu_actionPerformed(e);
101       }
102     });
103     viewMenu.setText(MessageManager.getString("action.view"));
104     viewMenu.addMenuListener(new MenuListener()
105     {
106       public void menuSelected(MenuEvent e)
107       {
108         viewMenu_menuSelected();
109       }
110
111       public void menuDeselected(MenuEvent e)
112       {
113       }
114
115       public void menuCanceled(MenuEvent e)
116       {
117       }
118     });
119     sortAssocViews.setText(MessageManager.getString("label.sort_alignment_by_tree"));
120     sortAssocViews.addActionListener(new java.awt.event.ActionListener()
121     {
122       public void actionPerformed(ActionEvent e)
123       {
124         sortByTree_actionPerformed(e);
125       }
126     });
127     font.setText(MessageManager.getString("action.font"));
128     font.addActionListener(new java.awt.event.ActionListener()
129     {
130       public void actionPerformed(ActionEvent e)
131       {
132         font_actionPerformed(e);
133       }
134     });
135     bootstrapMenu.setText(MessageManager.getString("label.show_bootstrap_values"));
136     bootstrapMenu.addActionListener(new java.awt.event.ActionListener()
137     {
138       public void actionPerformed(ActionEvent e)
139       {
140         bootstrapMenu_actionPerformed(e);
141       }
142     });
143     distanceMenu.setText(MessageManager.getString("label.show_distances"));
144     distanceMenu.addActionListener(new java.awt.event.ActionListener()
145     {
146       public void actionPerformed(ActionEvent e)
147       {
148         distanceMenu_actionPerformed(e);
149       }
150     });
151     fitToWindow.setSelected(true);
152     fitToWindow.setText(MessageManager.getString("label.fit_to_window"));
153     fitToWindow.addActionListener(new java.awt.event.ActionListener()
154     {
155       public void actionPerformed(ActionEvent e)
156       {
157         fitToWindow_actionPerformed(e);
158       }
159     });
160     epsTree.setText("EPS");
161     epsTree.addActionListener(new java.awt.event.ActionListener()
162     {
163       public void actionPerformed(ActionEvent e)
164       {
165         epsTree_actionPerformed(e);
166       }
167     });
168     pngTree.setText("PNG");
169     pngTree.addActionListener(new java.awt.event.ActionListener()
170     {
171       public void actionPerformed(ActionEvent e)
172       {
173         pngTree_actionPerformed(e);
174       }
175     });
176     saveAsMenu.setText(MessageManager.getString("action.save_as"));
177     placeholdersMenu
178             .setToolTipText(MessageManager.getString("label.marks_leaves_tree_not_associated_with_sequence"));
179     placeholdersMenu.setText(MessageManager.getString("label.mark_unlinked_leaves"));
180     placeholdersMenu.addActionListener(new ActionListener()
181     {
182       public void actionPerformed(ActionEvent e)
183       {
184         placeholdersMenu_actionPerformed(e);
185       }
186     });
187     textbox.setText(MessageManager.getString("label.out_to_textbox") + "...");
188     textbox.addActionListener(new ActionListener()
189     {
190       public void actionPerformed(ActionEvent e)
191       {
192         textbox_actionPerformed(e);
193       }
194     });
195     originalSeqData.setText(MessageManager.getString("label.input_data"));
196     originalSeqData.addActionListener(new ActionListener()
197     {
198       public void actionPerformed(ActionEvent e)
199       {
200         originalSeqData_actionPerformed(e);
201       }
202     });
203     associateLeavesMenu.setText(MessageManager.getString("label.associate_leaves_with"));
204     this.getContentPane().add(scrollPane, BorderLayout.CENTER);
205     jMenuBar1.add(fileMenu);
206     jMenuBar1.add(viewMenu);
207     fileMenu.add(saveAsMenu);
208     fileMenu.add(textbox);
209     fileMenu.add(printMenu);
210     fileMenu.add(originalSeqData);
211     viewMenu.add(fitToWindow);
212     viewMenu.add(font);
213     viewMenu.add(distanceMenu);
214     viewMenu.add(bootstrapMenu);
215     viewMenu.add(placeholdersMenu);
216     viewMenu.add(sortAssocViews);
217     viewMenu.add(associateLeavesMenu);
218     saveAsMenu.add(saveAsNewick);
219     saveAsMenu.add(epsTree);
220     saveAsMenu.add(pngTree);
221   }
222
223   public void printMenu_actionPerformed(ActionEvent e)
224   {
225   }
226
227   public void font_actionPerformed(ActionEvent e)
228   {
229   }
230
231   public void distanceMenu_actionPerformed(ActionEvent e)
232   {
233   }
234
235   public void bootstrapMenu_actionPerformed(ActionEvent e)
236   {
237   }
238
239   public void fitToWindow_actionPerformed(ActionEvent e)
240   {
241   }
242
243   public void pngTree_actionPerformed(ActionEvent e)
244   {
245   }
246
247   public void epsTree_actionPerformed(ActionEvent e)
248   {
249   }
250
251   public void saveAsNewick_actionPerformed(ActionEvent e)
252   {
253   }
254
255   public void placeholdersMenu_actionPerformed(ActionEvent e)
256   {
257   }
258
259   public void textbox_actionPerformed(ActionEvent e)
260   {
261   }
262
263   public void fullid_actionPerformed(ActionEvent e)
264   {
265
266   }
267
268   public void originalSeqData_actionPerformed(ActionEvent e)
269   {
270
271   }
272
273   public void viewMenu_menuSelected()
274   {
275   }
276
277   public void sortByTree_actionPerformed(ActionEvent e)
278   {
279
280   }
281
282 }