JAL-1355 typo in key
[jalview.git] / src / jalview / jbgui / GPCAPanel.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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
26 import javax.swing.*;
27 import javax.swing.event.*;
28
29 public class GPCAPanel extends JInternalFrame
30 {
31   JPanel jPanel2 = new JPanel();
32
33   JLabel jLabel1 = new JLabel();
34
35   JLabel jLabel2 = new JLabel();
36
37   JLabel jLabel3 = new JLabel();
38
39   protected JComboBox xCombobox = new JComboBox();
40
41   protected JComboBox yCombobox = new JComboBox();
42
43   protected JComboBox zCombobox = new JComboBox();
44
45   protected JButton resetButton = new JButton();
46
47   FlowLayout flowLayout1 = new FlowLayout();
48
49   BorderLayout borderLayout1 = new BorderLayout();
50
51   JMenuBar jMenuBar1 = new JMenuBar();
52
53   JMenu fileMenu = new JMenu();
54
55   JMenu saveMenu = new JMenu();
56
57   JMenuItem eps = new JMenuItem();
58
59   JMenuItem png = new JMenuItem();
60
61   JMenuItem print = new JMenuItem();
62
63   JMenuItem outputValues = new JMenuItem();
64
65   JMenuItem outputPoints = new JMenuItem();
66
67   JMenuItem outputProjPoints = new JMenuItem();
68
69   protected JMenu viewMenu = new JMenu();
70
71   protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
72
73   JMenuItem bgcolour = new JMenuItem();
74
75   JMenuItem originalSeqData = new JMenuItem();
76
77   protected JMenu associateViewsMenu = new JMenu();
78
79   protected JMenu calcSettings = new JMenu();
80
81   protected JCheckBoxMenuItem nuclSetting = new JCheckBoxMenuItem();
82
83   protected JCheckBoxMenuItem protSetting = new JCheckBoxMenuItem();
84
85   protected JCheckBoxMenuItem jvVersionSetting = new JCheckBoxMenuItem();
86
87   protected JLabel statusBar = new JLabel();
88
89   protected GridLayout statusPanelLayout = new GridLayout();
90
91   protected JPanel statusPanel = new JPanel();
92
93   public GPCAPanel()
94   {
95     try
96     {
97       jbInit();
98     } catch (Exception e)
99     {
100       e.printStackTrace();
101     }
102
103     for (int i = 1; i < 8; i++)
104     {
105       xCombobox.addItem("dim " + i);
106       yCombobox.addItem("dim " + i);
107       zCombobox.addItem("dim " + i);
108     }
109
110     setJMenuBar(jMenuBar1);
111   }
112
113   private void jbInit() throws Exception
114   {
115     this.getContentPane().setLayout(borderLayout1);
116     jPanel2.setLayout(flowLayout1);
117     jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
118     jLabel1.setText("x=");
119     jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
120     jLabel2.setText("y=");
121     jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
122     jLabel3.setText("z=");
123     jPanel2.setBackground(Color.white);
124     jPanel2.setBorder(null);
125     zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
126     zCombobox.addActionListener(new java.awt.event.ActionListener()
127     {
128       public void actionPerformed(ActionEvent e)
129       {
130         zCombobox_actionPerformed(e);
131       }
132     });
133     yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
134     yCombobox.addActionListener(new java.awt.event.ActionListener()
135     {
136       public void actionPerformed(ActionEvent e)
137       {
138         yCombobox_actionPerformed(e);
139       }
140     });
141     xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
142     xCombobox.addActionListener(new java.awt.event.ActionListener()
143     {
144       public void actionPerformed(ActionEvent e)
145       {
146         xCombobox_actionPerformed(e);
147       }
148     });
149     resetButton.setFont(new java.awt.Font("Verdana", 0, 12));
150     resetButton.setText(MessageManager.getString("action.reset"));
151     resetButton.addActionListener(new java.awt.event.ActionListener()
152     {
153       @Override
154       public void actionPerformed(ActionEvent e)
155       {
156         resetButton_actionPerformed(e);
157       }
158     });
159     fileMenu.setText(MessageManager.getString("action.file"));
160     saveMenu.setText(MessageManager.getString("action.save_as"));
161     eps.setText("EPS");
162     eps.addActionListener(new ActionListener()
163     {
164       public void actionPerformed(ActionEvent e)
165       {
166         eps_actionPerformed(e);
167       }
168     });
169     png.setText("PNG");
170     png.addActionListener(new ActionListener()
171     {
172       public void actionPerformed(ActionEvent e)
173       {
174         png_actionPerformed(e);
175       }
176     });
177     outputValues.setText(MessageManager.getString("label.output_values"));
178     outputValues.addActionListener(new ActionListener()
179     {
180       public void actionPerformed(ActionEvent e)
181       {
182         outputValues_actionPerformed(e);
183       }
184     });
185     outputPoints.setText(MessageManager.getString("label.output_points"));
186     outputPoints.addActionListener(new ActionListener()
187     {
188       public void actionPerformed(ActionEvent e)
189       {
190         outputPoints_actionPerformed(e);
191       }
192     });
193     outputProjPoints.setText(MessageManager.getString("label.output_transformed_points") + "...");
194     outputProjPoints.addActionListener(new ActionListener()
195     {
196       public void actionPerformed(ActionEvent e)
197       {
198         outputProjPoints_actionPerformed(e);
199       }
200     });
201     print.addActionListener(new ActionListener()
202     {
203       public void actionPerformed(ActionEvent e)
204       {
205         print_actionPerformed(e);
206       }
207     });
208     viewMenu.setText(MessageManager.getString("action.view"));
209     viewMenu.addMenuListener(new MenuListener()
210     {
211       public void menuSelected(MenuEvent e)
212       {
213         viewMenu_menuSelected();
214       }
215
216       public void menuDeselected(MenuEvent e)
217       {
218       }
219
220       public void menuCanceled(MenuEvent e)
221       {
222       }
223     });
224     showLabels.setText(MessageManager.getString("label.show_labels"));
225     showLabels.addActionListener(new ActionListener()
226     {
227       public void actionPerformed(ActionEvent e)
228       {
229         showLabels_actionPerformed(e);
230       }
231     });
232     print.setText(MessageManager.getString("action.print"));
233     bgcolour.setText(MessageManager.getString("label.background_colour") + "...");
234     bgcolour.addActionListener(new ActionListener()
235     {
236       public void actionPerformed(ActionEvent e)
237       {
238         bgcolour_actionPerformed(e);
239       }
240     });
241     originalSeqData.setText(MessageManager.getString("label.input_data"));
242     originalSeqData.addActionListener(new ActionListener()
243     {
244       public void actionPerformed(ActionEvent e)
245       {
246         originalSeqData_actionPerformed(e);
247       }
248     });
249     associateViewsMenu.setText(MessageManager.getString("label.associate_nodes_with"));
250     calcSettings.setText(MessageManager.getString("action.change_params"));
251     nuclSetting.setText(MessageManager.getString("label.nucleotide_matrix"));
252     protSetting.setText(MessageManager.getString("label.protein_matrix"));
253     nuclSetting.addActionListener(new ActionListener()
254     {
255
256       @Override
257       public void actionPerformed(ActionEvent arg0)
258       {
259         nuclSetting_actionPerfomed(arg0);
260       }
261     });
262     protSetting.addActionListener(new ActionListener()
263     {
264
265       @Override
266       public void actionPerformed(ActionEvent arg0)
267       {
268         protSetting_actionPerfomed(arg0);
269       }
270     });
271     jvVersionSetting.setText(MessageManager.getString("label.jalview_pca_calculation"));
272     jvVersionSetting.addActionListener(new ActionListener()
273     {
274       @Override
275       public void actionPerformed(ActionEvent arg0)
276       {
277         jvVersionSetting_actionPerfomed(arg0);
278       }
279     });
280     calcSettings.add(jvVersionSetting);
281     calcSettings.add(nuclSetting);
282     calcSettings.add(protSetting);
283     statusPanel.setLayout(statusPanelLayout);
284     statusBar.setFont(new java.awt.Font("Verdana", 0, 12));
285     // statusPanel.setBackground(Color.lightGray);
286     // statusBar.setBackground(Color.lightGray);
287     // statusPanel.add(statusBar, null);
288     JPanel panelBar = new JPanel(new BorderLayout());
289     panelBar.add(jPanel2, BorderLayout.NORTH);
290     panelBar.add(statusPanel, BorderLayout.SOUTH);
291     this.getContentPane().add(panelBar, BorderLayout.SOUTH);
292     jPanel2.add(jLabel1, null);
293     jPanel2.add(xCombobox, null);
294     jPanel2.add(jLabel2, null);
295     jPanel2.add(yCombobox, null);
296     jPanel2.add(jLabel3, null);
297     jPanel2.add(zCombobox, null);
298     jPanel2.add(resetButton, null);
299     jMenuBar1.add(fileMenu);
300     jMenuBar1.add(viewMenu);
301     jMenuBar1.add(calcSettings);
302     fileMenu.add(saveMenu);
303     fileMenu.add(outputValues);
304     fileMenu.add(print);
305     fileMenu.add(originalSeqData);
306     fileMenu.add(outputPoints);
307     fileMenu.add(outputProjPoints);
308     saveMenu.add(eps);
309     saveMenu.add(png);
310     viewMenu.add(showLabels);
311     viewMenu.add(bgcolour);
312     viewMenu.add(associateViewsMenu);
313   }
314
315   protected void resetButton_actionPerformed(ActionEvent e)
316   {
317     // TODO Auto-generated method stub
318
319   }
320
321   protected void protSetting_actionPerfomed(ActionEvent arg0)
322   {
323     // TODO Auto-generated method stub
324
325   }
326
327   protected void nuclSetting_actionPerfomed(ActionEvent arg0)
328   {
329     // TODO Auto-generated method stub
330
331   }
332
333   protected void outputPoints_actionPerformed(ActionEvent e)
334   {
335     // TODO Auto-generated method stub
336
337   }
338
339   protected void outputProjPoints_actionPerformed(ActionEvent e)
340   {
341     // TODO Auto-generated method stub
342
343   }
344
345   protected void xCombobox_actionPerformed(ActionEvent e)
346   {
347   }
348
349   protected void yCombobox_actionPerformed(ActionEvent e)
350   {
351   }
352
353   protected void zCombobox_actionPerformed(ActionEvent e)
354   {
355   }
356
357   public void eps_actionPerformed(ActionEvent e)
358   {
359
360   }
361
362   public void png_actionPerformed(ActionEvent e)
363   {
364
365   }
366
367   public void outputValues_actionPerformed(ActionEvent e)
368   {
369
370   }
371
372   public void print_actionPerformed(ActionEvent e)
373   {
374
375   }
376
377   public void showLabels_actionPerformed(ActionEvent e)
378   {
379
380   }
381
382   public void bgcolour_actionPerformed(ActionEvent e)
383   {
384
385   }
386
387   public void originalSeqData_actionPerformed(ActionEvent e)
388   {
389
390   }
391
392   public void viewMenu_menuSelected()
393   {
394
395   }
396
397   protected void jvVersionSetting_actionPerfomed(ActionEvent arg0)
398   {
399     // TODO Auto-generated method stub
400
401   }
402 }