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