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