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