update author list in license for (JAL-826)
[jalview.git] / src / jalview / jbgui / GPCAPanel.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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  */
18 package jalview.jbgui;
19
20 import java.awt.*;
21 import java.awt.event.*;
22
23 import javax.swing.*;
24 import javax.swing.event.*;
25
26 public class GPCAPanel extends JInternalFrame
27 {
28   JPanel jPanel2 = new JPanel();
29
30   JLabel jLabel1 = new JLabel();
31
32   JLabel jLabel2 = new JLabel();
33
34   JLabel jLabel3 = new JLabel();
35
36   protected JComboBox xCombobox = new JComboBox();
37
38   protected JComboBox yCombobox = new JComboBox();
39
40   protected JComboBox zCombobox = new JComboBox();
41
42   FlowLayout flowLayout1 = new FlowLayout();
43
44   BorderLayout borderLayout1 = new BorderLayout();
45
46   JMenuBar jMenuBar1 = new JMenuBar();
47
48   JMenu fileMenu = new JMenu();
49
50   JMenu saveMenu = new JMenu();
51
52   JMenuItem eps = new JMenuItem();
53
54   JMenuItem png = new JMenuItem();
55
56   JMenuItem print = new JMenuItem();
57
58   JMenuItem outputValues = new JMenuItem();
59
60   JMenuItem outputPoints = new JMenuItem();
61
62   JMenuItem outputProjPoints = new JMenuItem();
63
64   protected JMenu viewMenu = new JMenu();
65
66   protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
67
68   JMenuItem bgcolour = new JMenuItem();
69
70   JMenuItem originalSeqData = new JMenuItem();
71
72   protected JMenu associateViewsMenu = new JMenu();
73
74   public GPCAPanel()
75   {
76     try
77     {
78       jbInit();
79     } catch (Exception e)
80     {
81       e.printStackTrace();
82     }
83
84     for (int i = 1; i < 8; i++)
85     {
86       xCombobox.addItem("dim " + i);
87       yCombobox.addItem("dim " + i);
88       zCombobox.addItem("dim " + i);
89     }
90
91     setJMenuBar(jMenuBar1);
92   }
93
94   private void jbInit() throws Exception
95   {
96     this.getContentPane().setLayout(borderLayout1);
97     jPanel2.setLayout(flowLayout1);
98     jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
99     jLabel1.setText("x=");
100     jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
101     jLabel2.setText("y=");
102     jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
103     jLabel3.setText("z=");
104     jPanel2.setBackground(Color.white);
105     jPanel2.setBorder(null);
106     zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
107     zCombobox.addActionListener(new java.awt.event.ActionListener()
108     {
109       public void actionPerformed(ActionEvent e)
110       {
111         zCombobox_actionPerformed(e);
112       }
113     });
114     yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
115     yCombobox.addActionListener(new java.awt.event.ActionListener()
116     {
117       public void actionPerformed(ActionEvent e)
118       {
119         yCombobox_actionPerformed(e);
120       }
121     });
122     xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
123     xCombobox.addActionListener(new java.awt.event.ActionListener()
124     {
125       public void actionPerformed(ActionEvent e)
126       {
127         xCombobox_actionPerformed(e);
128       }
129     });
130     fileMenu.setText("File");
131     saveMenu.setText("Save as");
132     eps.setText("EPS");
133     eps.addActionListener(new ActionListener()
134     {
135       public void actionPerformed(ActionEvent e)
136       {
137         eps_actionPerformed(e);
138       }
139     });
140     png.setText("PNG");
141     png.addActionListener(new ActionListener()
142     {
143       public void actionPerformed(ActionEvent e)
144       {
145         png_actionPerformed(e);
146       }
147     });
148     outputValues.setText("Output Values...");
149     outputValues.addActionListener(new ActionListener()
150     {
151       public void actionPerformed(ActionEvent e)
152       {
153         outputValues_actionPerformed(e);
154       }
155     });
156     outputPoints.setText("Output points...");
157     outputPoints.addActionListener(new ActionListener()
158     {
159       public void actionPerformed(ActionEvent e)
160       {
161         outputPoints_actionPerformed(e);
162       }
163     });
164     outputProjPoints.setText("Output transformed points...");
165     outputProjPoints.addActionListener(new ActionListener()
166     {
167       public void actionPerformed(ActionEvent e)
168       {
169         outputProjPoints_actionPerformed(e);
170       }
171     });
172     print.addActionListener(new ActionListener()
173     {
174       public void actionPerformed(ActionEvent e)
175       {
176         print_actionPerformed(e);
177       }
178     });
179     viewMenu.setText("View");
180     viewMenu.addMenuListener(new MenuListener()
181     {
182       public void menuSelected(MenuEvent e)
183       {
184         viewMenu_menuSelected();
185       }
186
187       public void menuDeselected(MenuEvent e)
188       {
189       }
190
191       public void menuCanceled(MenuEvent e)
192       {
193       }
194     });
195     showLabels.setText("Show Labels");
196     showLabels.addActionListener(new ActionListener()
197     {
198       public void actionPerformed(ActionEvent e)
199       {
200         showLabels_actionPerformed(e);
201       }
202     });
203     print.setText("Print");
204     bgcolour.setText("Background Colour...");
205     bgcolour.addActionListener(new ActionListener()
206     {
207       public void actionPerformed(ActionEvent e)
208       {
209         bgcolour_actionPerformed(e);
210       }
211     });
212     originalSeqData.setText("Input Data...");
213     originalSeqData.addActionListener(new ActionListener()
214     {
215       public void actionPerformed(ActionEvent e)
216       {
217         originalSeqData_actionPerformed(e);
218       }
219     });
220     associateViewsMenu.setText("Associate Nodes With");
221     this.getContentPane().add(jPanel2, BorderLayout.SOUTH);
222     jPanel2.add(jLabel1, null);
223     jPanel2.add(xCombobox, null);
224     jPanel2.add(jLabel2, null);
225     jPanel2.add(yCombobox, null);
226     jPanel2.add(jLabel3, null);
227     jPanel2.add(zCombobox, null);
228     jMenuBar1.add(fileMenu);
229     jMenuBar1.add(viewMenu);
230     fileMenu.add(saveMenu);
231     fileMenu.add(outputValues);
232     fileMenu.add(print);
233     fileMenu.add(originalSeqData);
234     fileMenu.add(outputPoints);
235     fileMenu.add(outputProjPoints);
236     saveMenu.add(eps);
237     saveMenu.add(png);
238     viewMenu.add(showLabels);
239     viewMenu.add(bgcolour);
240     viewMenu.add(associateViewsMenu);
241   }
242
243   protected void outputPoints_actionPerformed(ActionEvent e)
244   {
245     // TODO Auto-generated method stub
246
247   }
248
249   protected void outputProjPoints_actionPerformed(ActionEvent e)
250   {
251     // TODO Auto-generated method stub
252
253   }
254
255   protected void xCombobox_actionPerformed(ActionEvent e)
256   {
257   }
258
259   protected void yCombobox_actionPerformed(ActionEvent e)
260   {
261   }
262
263   protected void zCombobox_actionPerformed(ActionEvent e)
264   {
265   }
266
267   public void eps_actionPerformed(ActionEvent e)
268   {
269
270   }
271
272   public void png_actionPerformed(ActionEvent e)
273   {
274
275   }
276
277   public void outputValues_actionPerformed(ActionEvent e)
278   {
279
280   }
281
282   public void print_actionPerformed(ActionEvent e)
283   {
284
285   }
286
287   public void showLabels_actionPerformed(ActionEvent e)
288   {
289
290   }
291
292   public void bgcolour_actionPerformed(ActionEvent e)
293   {
294
295   }
296
297   public void originalSeqData_actionPerformed(ActionEvent e)
298   {
299
300   }
301
302   public void viewMenu_menuSelected()
303   {
304
305   }
306 }