6ad36e85a7aa732fd90388ff6bda429dd459e9b4
[jalview.git] / src / jalview / jbgui / GPCAPanel.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3  * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
4  * 
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  * 
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  * 
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
18  */
19 package jalview.jbgui;
20
21 import java.awt.*;
22 import java.awt.event.*;
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   protected JMenu viewMenu = new JMenu();
61
62   protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
63
64   JMenuItem bgcolour = new JMenuItem();
65
66   JMenuItem originalSeqData = new JMenuItem();
67
68   protected JMenu associateViewsMenu = new JMenu();
69
70   public GPCAPanel()
71   {
72     try
73     {
74       jbInit();
75     } catch (Exception e)
76     {
77       e.printStackTrace();
78     }
79
80     for (int i = 1; i < 8; i++)
81     {
82       xCombobox.addItem("dim " + i);
83       yCombobox.addItem("dim " + i);
84       zCombobox.addItem("dim " + i);
85     }
86
87     setJMenuBar(jMenuBar1);
88   }
89
90   private void jbInit() throws Exception
91   {
92     this.getContentPane().setLayout(borderLayout1);
93     jPanel2.setLayout(flowLayout1);
94     jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
95     jLabel1.setText("x=");
96     jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
97     jLabel2.setText("y=");
98     jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
99     jLabel3.setText("z=");
100     jPanel2.setBackground(Color.white);
101     jPanel2.setBorder(null);
102     zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
103     zCombobox.addActionListener(new java.awt.event.ActionListener()
104     {
105       public void actionPerformed(ActionEvent e)
106       {
107         zCombobox_actionPerformed(e);
108       }
109     });
110     yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
111     yCombobox.addActionListener(new java.awt.event.ActionListener()
112     {
113       public void actionPerformed(ActionEvent e)
114       {
115         yCombobox_actionPerformed(e);
116       }
117     });
118     xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
119     xCombobox.addActionListener(new java.awt.event.ActionListener()
120     {
121       public void actionPerformed(ActionEvent e)
122       {
123         xCombobox_actionPerformed(e);
124       }
125     });
126     fileMenu.setText("File");
127     saveMenu.setText("Save as");
128     eps.setText("EPS");
129     eps.addActionListener(new ActionListener()
130     {
131       public void actionPerformed(ActionEvent e)
132       {
133         eps_actionPerformed(e);
134       }
135     });
136     png.setText("PNG");
137     png.addActionListener(new ActionListener()
138     {
139       public void actionPerformed(ActionEvent e)
140       {
141         png_actionPerformed(e);
142       }
143     });
144     outputValues.setText("Output Values...");
145     outputValues.addActionListener(new ActionListener()
146     {
147       public void actionPerformed(ActionEvent e)
148       {
149         outputValues_actionPerformed(e);
150       }
151     });
152     print.addActionListener(new ActionListener()
153     {
154       public void actionPerformed(ActionEvent e)
155       {
156         print_actionPerformed(e);
157       }
158     });
159     viewMenu.setText("View");
160     viewMenu.addMenuListener(new MenuListener()
161     {
162       public void menuSelected(MenuEvent e)
163       {
164         viewMenu_menuSelected();
165       }
166
167       public void menuDeselected(MenuEvent e)
168       {
169       }
170
171       public void menuCanceled(MenuEvent e)
172       {
173       }
174     });
175     showLabels.setText("Show Labels");
176     showLabels.addActionListener(new ActionListener()
177     {
178       public void actionPerformed(ActionEvent e)
179       {
180         showLabels_actionPerformed(e);
181       }
182     });
183     print.setText("Print");
184     bgcolour.setText("Background Colour...");
185     bgcolour.addActionListener(new ActionListener()
186     {
187       public void actionPerformed(ActionEvent e)
188       {
189         bgcolour_actionPerformed(e);
190       }
191     });
192     originalSeqData.setText("Input Data...");
193     originalSeqData.addActionListener(new ActionListener()
194     {
195       public void actionPerformed(ActionEvent e)
196       {
197         originalSeqData_actionPerformed(e);
198       }
199     });
200     associateViewsMenu.setText("Associate Nodes With");
201     this.getContentPane().add(jPanel2, BorderLayout.SOUTH);
202     jPanel2.add(jLabel1, null);
203     jPanel2.add(xCombobox, null);
204     jPanel2.add(jLabel2, null);
205     jPanel2.add(yCombobox, null);
206     jPanel2.add(jLabel3, null);
207     jPanel2.add(zCombobox, null);
208     jMenuBar1.add(fileMenu);
209     jMenuBar1.add(viewMenu);
210     fileMenu.add(saveMenu);
211     fileMenu.add(outputValues);
212     fileMenu.add(print);
213     fileMenu.add(originalSeqData);
214     saveMenu.add(eps);
215     saveMenu.add(png);
216     viewMenu.add(showLabels);
217     viewMenu.add(bgcolour);
218     viewMenu.add(associateViewsMenu);
219   }
220
221   protected void xCombobox_actionPerformed(ActionEvent e)
222   {
223   }
224
225   protected void yCombobox_actionPerformed(ActionEvent e)
226   {
227   }
228
229   protected void zCombobox_actionPerformed(ActionEvent e)
230   {
231   }
232
233   public void eps_actionPerformed(ActionEvent e)
234   {
235
236   }
237
238   public void png_actionPerformed(ActionEvent e)
239   {
240
241   }
242
243   public void outputValues_actionPerformed(ActionEvent e)
244   {
245
246   }
247
248   public void print_actionPerformed(ActionEvent e)
249   {
250
251   }
252
253   public void showLabels_actionPerformed(ActionEvent e)
254   {
255
256   }
257
258   public void bgcolour_actionPerformed(ActionEvent e)
259   {
260
261   }
262
263   public void originalSeqData_actionPerformed(ActionEvent e)
264   {
265
266   }
267
268   public void viewMenu_menuSelected()
269   {
270
271   }
272 }