JAL-2403 redundant 'implements' removed
[jalview.git] / src / jalview / jbgui / GTreePanel.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ 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.BorderLayout;
26 import java.awt.Color;
27 import java.awt.event.ActionEvent;
28 import java.awt.event.ActionListener;
29
30 import javax.swing.JCheckBoxMenuItem;
31 import javax.swing.JInternalFrame;
32 import javax.swing.JMenu;
33 import javax.swing.JMenuBar;
34 import javax.swing.JMenuItem;
35 import javax.swing.JScrollPane;
36 import javax.swing.event.MenuEvent;
37 import javax.swing.event.MenuListener;
38
39 public class GTreePanel extends JInternalFrame
40 {
41   BorderLayout borderLayout1 = new BorderLayout();
42
43   public JScrollPane scrollPane = new JScrollPane();
44
45   JMenuBar jMenuBar1 = new JMenuBar();
46
47   JMenu fileMenu = new JMenu();
48
49   JMenuItem saveAsNewick = new JMenuItem();
50
51   JMenuItem printMenu = new JMenuItem();
52
53   protected JMenu viewMenu = new JMenu();
54
55   public JMenuItem font = new JMenuItem();
56
57   public JMenuItem sortAssocViews = new JMenuItem();
58
59   public JCheckBoxMenuItem bootstrapMenu = new JCheckBoxMenuItem();
60
61   public JCheckBoxMenuItem distanceMenu = new JCheckBoxMenuItem();
62
63   public JCheckBoxMenuItem fitToWindow = new JCheckBoxMenuItem();
64
65   public JCheckBoxMenuItem placeholdersMenu = new JCheckBoxMenuItem();
66
67   JMenuItem pngTree = new JMenuItem();
68
69   JMenuItem epsTree = new JMenuItem();
70
71   JMenu saveAsMenu = new JMenu();
72
73   JMenuItem textbox = new JMenuItem();
74
75   public JMenuItem originalSeqData = new JMenuItem();
76
77   protected JMenu associateLeavesMenu = new JMenu();
78
79   public GTreePanel()
80   {
81     try
82     {
83       jbInit();
84       this.setJMenuBar(jMenuBar1);
85     } catch (Exception e)
86     {
87       e.printStackTrace();
88     }
89   }
90
91   private void jbInit() throws Exception
92   {
93     this.getContentPane().setLayout(borderLayout1);
94     this.setBackground(Color.white);
95     this.setFont(new java.awt.Font("Verdana", 0, 12));
96     scrollPane.setOpaque(false);
97     fileMenu.setText(MessageManager.getString("action.file"));
98     saveAsNewick.setText(MessageManager.getString("label.newick_format"));
99     saveAsNewick.addActionListener(new ActionListener()
100     {
101       public void actionPerformed(ActionEvent e)
102       {
103         saveAsNewick_actionPerformed(e);
104       }
105     });
106     printMenu.setText(MessageManager.getString("action.print"));
107     printMenu.addActionListener(new java.awt.event.ActionListener()
108     {
109       public void actionPerformed(ActionEvent e)
110       {
111         printMenu_actionPerformed(e);
112       }
113     });
114     viewMenu.setText(MessageManager.getString("action.view"));
115     viewMenu.addMenuListener(new MenuListener()
116     {
117       public void menuSelected(MenuEvent e)
118       {
119         viewMenu_menuSelected();
120       }
121
122       public void menuDeselected(MenuEvent e)
123       {
124       }
125
126       public void menuCanceled(MenuEvent e)
127       {
128       }
129     });
130     sortAssocViews.setText(MessageManager
131             .getString("label.sort_alignment_by_tree"));
132     sortAssocViews.addActionListener(new java.awt.event.ActionListener()
133     {
134       public void actionPerformed(ActionEvent e)
135       {
136         sortByTree_actionPerformed();
137       }
138     });
139     font.setText(MessageManager.getString("action.font"));
140     font.addActionListener(new java.awt.event.ActionListener()
141     {
142       public void actionPerformed(ActionEvent e)
143       {
144         font_actionPerformed(e);
145       }
146     });
147     bootstrapMenu.setText(MessageManager
148             .getString("label.show_bootstrap_values"));
149     bootstrapMenu.addActionListener(new java.awt.event.ActionListener()
150     {
151       public void actionPerformed(ActionEvent e)
152       {
153         bootstrapMenu_actionPerformed(e);
154       }
155     });
156     distanceMenu.setText(MessageManager.getString("label.show_distances"));
157     distanceMenu.addActionListener(new java.awt.event.ActionListener()
158     {
159       public void actionPerformed(ActionEvent e)
160       {
161         distanceMenu_actionPerformed(e);
162       }
163     });
164     fitToWindow.setSelected(true);
165     fitToWindow.setText(MessageManager.getString("label.fit_to_window"));
166     fitToWindow.addActionListener(new java.awt.event.ActionListener()
167     {
168       public void actionPerformed(ActionEvent e)
169       {
170         fitToWindow_actionPerformed(e);
171       }
172     });
173     epsTree.setText("EPS");
174     epsTree.addActionListener(new java.awt.event.ActionListener()
175     {
176       public void actionPerformed(ActionEvent e)
177       {
178         epsTree_actionPerformed(e);
179       }
180     });
181     pngTree.setText("PNG");
182     pngTree.addActionListener(new java.awt.event.ActionListener()
183     {
184       public void actionPerformed(ActionEvent e)
185       {
186         pngTree_actionPerformed(e);
187       }
188     });
189     saveAsMenu.setText(MessageManager.getString("action.save_as"));
190     placeholdersMenu
191             .setToolTipText(MessageManager
192                     .getString("label.marks_leaves_tree_not_associated_with_sequence"));
193     placeholdersMenu.setText(MessageManager
194             .getString("label.mark_unlinked_leaves"));
195     placeholdersMenu.addActionListener(new ActionListener()
196     {
197       public void actionPerformed(ActionEvent e)
198       {
199         placeholdersMenu_actionPerformed(e);
200       }
201     });
202     textbox.setText(MessageManager.getString("label.out_to_textbox"));
203     textbox.addActionListener(new ActionListener()
204     {
205       public void actionPerformed(ActionEvent e)
206       {
207         textbox_actionPerformed(e);
208       }
209     });
210     originalSeqData.setText(MessageManager.getString("label.input_data"));
211     originalSeqData.addActionListener(new ActionListener()
212     {
213       public void actionPerformed(ActionEvent e)
214       {
215         originalSeqData_actionPerformed(e);
216       }
217     });
218     associateLeavesMenu.setText(MessageManager
219             .getString("label.associate_leaves_with"));
220     this.getContentPane().add(scrollPane, BorderLayout.CENTER);
221     jMenuBar1.add(fileMenu);
222     jMenuBar1.add(viewMenu);
223     fileMenu.add(saveAsMenu);
224     fileMenu.add(textbox);
225     fileMenu.add(printMenu);
226     fileMenu.add(originalSeqData);
227     viewMenu.add(fitToWindow);
228     viewMenu.add(font);
229     viewMenu.add(distanceMenu);
230     viewMenu.add(bootstrapMenu);
231     viewMenu.add(placeholdersMenu);
232     viewMenu.add(sortAssocViews);
233     viewMenu.add(associateLeavesMenu);
234     saveAsMenu.add(saveAsNewick);
235     saveAsMenu.add(epsTree);
236     saveAsMenu.add(pngTree);
237   }
238
239   public void printMenu_actionPerformed(ActionEvent e)
240   {
241   }
242
243   public void font_actionPerformed(ActionEvent e)
244   {
245   }
246
247   public void distanceMenu_actionPerformed(ActionEvent e)
248   {
249   }
250
251   public void bootstrapMenu_actionPerformed(ActionEvent e)
252   {
253   }
254
255   public void fitToWindow_actionPerformed(ActionEvent e)
256   {
257   }
258
259   public void pngTree_actionPerformed(ActionEvent e)
260   {
261   }
262
263   public void epsTree_actionPerformed(ActionEvent e)
264   {
265   }
266
267   public void saveAsNewick_actionPerformed(ActionEvent e)
268   {
269   }
270
271   public void placeholdersMenu_actionPerformed(ActionEvent e)
272   {
273   }
274
275   public void textbox_actionPerformed(ActionEvent e)
276   {
277   }
278
279   public void fullid_actionPerformed(ActionEvent e)
280   {
281
282   }
283
284   public void originalSeqData_actionPerformed(ActionEvent e)
285   {
286
287   }
288
289   public void viewMenu_menuSelected()
290   {
291   }
292
293   public void sortByTree_actionPerformed()
294   {
295
296   }
297
298 }