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