header updated
[jalview.git] / src / jalview / jbgui / GPCAPanel.java
1 /*\r
2  * Jalview - A Sequence Alignment Editor and Viewer\r
3  * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4  *\r
5  * This program is free software; you can redistribute it and/or\r
6  * modify it under the terms of the GNU General Public License\r
7  * as published by the Free Software Foundation; either version 2\r
8  * of the License, or (at your option) any later version.\r
9  *\r
10  * This program is distributed in the hope that it will be useful,\r
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13  * GNU General Public License for more details.\r
14  *\r
15  * You should have received a copy of the GNU General Public License\r
16  * along with this program; if not, write to the Free Software\r
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
18  */\r
19 package jalview.jbgui;\r
20 \r
21 import java.awt.*;\r
22 import java.awt.event.*;\r
23 import javax.swing.*;\r
24 \r
25 public class GPCAPanel\r
26     extends JInternalFrame\r
27 {\r
28   JPanel jPanel2 = new JPanel();\r
29   JLabel jLabel1 = new JLabel();\r
30   JLabel jLabel2 = new JLabel();\r
31   JLabel jLabel3 = new JLabel();\r
32   protected JComboBox xCombobox = new JComboBox();\r
33   protected JComboBox yCombobox = new JComboBox();\r
34   protected JComboBox zCombobox = new JComboBox();\r
35   FlowLayout flowLayout1 = new FlowLayout();\r
36   BorderLayout borderLayout1 = new BorderLayout();\r
37   JMenuBar jMenuBar1 = new JMenuBar();\r
38   JMenu fileMenu = new JMenu();\r
39   JMenu saveMenu = new JMenu();\r
40   JMenuItem eps = new JMenuItem();\r
41   JMenuItem png = new JMenuItem();\r
42   JMenuItem print = new JMenuItem();\r
43   JMenuItem outputValues = new JMenuItem();\r
44   JMenu viewMenu = new JMenu();\r
45   protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();\r
46   JMenuItem bgcolour = new JMenuItem();\r
47   JMenuItem originalSeqData = new JMenuItem();\r
48 \r
49   public GPCAPanel()\r
50   {\r
51     try\r
52     {\r
53       jbInit();\r
54     }\r
55     catch (Exception e)\r
56     {\r
57       e.printStackTrace();\r
58     }\r
59 \r
60     for (int i = 1; i < 8; i++)\r
61     {\r
62       xCombobox.addItem("dim " + i);\r
63       yCombobox.addItem("dim " + i);\r
64       zCombobox.addItem("dim " + i);\r
65     }\r
66 \r
67 \r
68     setJMenuBar(jMenuBar1);\r
69   }\r
70 \r
71   private void jbInit()\r
72       throws Exception\r
73   {\r
74     this.getContentPane().setLayout(borderLayout1);\r
75     jPanel2.setLayout(flowLayout1);\r
76     jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));\r
77     jLabel1.setText("x=");\r
78     jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));\r
79     jLabel2.setText("y=");\r
80     jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));\r
81     jLabel3.setText("z=");\r
82     jPanel2.setBackground(Color.white);\r
83     jPanel2.setBorder(null);\r
84     zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
85     zCombobox.addActionListener(new java.awt.event.ActionListener()\r
86     {\r
87       public void actionPerformed(ActionEvent e)\r
88       {\r
89         zCombobox_actionPerformed(e);\r
90       }\r
91     });\r
92     yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
93     yCombobox.addActionListener(new java.awt.event.ActionListener()\r
94     {\r
95       public void actionPerformed(ActionEvent e)\r
96       {\r
97         yCombobox_actionPerformed(e);\r
98       }\r
99     });\r
100     xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
101     xCombobox.addActionListener(new java.awt.event.ActionListener()\r
102     {\r
103       public void actionPerformed(ActionEvent e)\r
104       {\r
105         xCombobox_actionPerformed(e);\r
106       }\r
107     });\r
108     fileMenu.setText("File");\r
109     saveMenu.setText("Save as");\r
110     eps.setText("EPS");\r
111     eps.addActionListener(new ActionListener()\r
112     {\r
113       public void actionPerformed(ActionEvent e)\r
114       {\r
115         eps_actionPerformed(e);\r
116       }\r
117     });\r
118     png.setText("PNG");\r
119     png.addActionListener(new ActionListener()\r
120     {\r
121       public void actionPerformed(ActionEvent e)\r
122       {\r
123         png_actionPerformed(e);\r
124       }\r
125     });\r
126     outputValues.setText("Output Values...");\r
127     outputValues.addActionListener(new ActionListener()\r
128     {\r
129       public void actionPerformed(ActionEvent e)\r
130       {\r
131         outputValues_actionPerformed(e);\r
132       }\r
133     });\r
134     print.addActionListener(new ActionListener()\r
135     {\r
136       public void actionPerformed(ActionEvent e)\r
137       {\r
138         print_actionPerformed(e);\r
139       }\r
140     });\r
141     viewMenu.setText("View");\r
142     showLabels.setText("Show Labels");\r
143     showLabels.addActionListener(new ActionListener()\r
144     {\r
145       public void actionPerformed(ActionEvent e)\r
146       {\r
147         showLabels_actionPerformed(e);\r
148       }\r
149     });\r
150     print.setText("Print");\r
151     bgcolour.setText("Background Colour...");\r
152     bgcolour.addActionListener(new ActionListener()\r
153     {\r
154       public void actionPerformed(ActionEvent e)\r
155       {\r
156         bgcolour_actionPerformed(e);\r
157       }\r
158     });\r
159     originalSeqData.setText("Input Data...");\r
160     originalSeqData.addActionListener(new ActionListener()\r
161     {\r
162       public void actionPerformed(ActionEvent e)\r
163       {\r
164         originalSeqData_actionPerformed(e);\r
165       }\r
166     });\r
167     this.getContentPane().add(jPanel2, BorderLayout.SOUTH);\r
168     jPanel2.add(jLabel1, null);\r
169     jPanel2.add(xCombobox, null);\r
170     jPanel2.add(jLabel2, null);\r
171     jPanel2.add(yCombobox, null);\r
172     jPanel2.add(jLabel3, null);\r
173     jPanel2.add(zCombobox, null);\r
174     jMenuBar1.add(fileMenu);\r
175     jMenuBar1.add(viewMenu);\r
176     fileMenu.add(saveMenu);\r
177     fileMenu.add(outputValues);\r
178     fileMenu.add(print);\r
179     fileMenu.add(originalSeqData);\r
180     saveMenu.add(eps);\r
181     saveMenu.add(png);\r
182     viewMenu.add(showLabels);\r
183     viewMenu.add(bgcolour);\r
184   }\r
185 \r
186   protected void xCombobox_actionPerformed(ActionEvent e)\r
187   {\r
188   }\r
189 \r
190   protected void yCombobox_actionPerformed(ActionEvent e)\r
191   {\r
192   }\r
193 \r
194   protected void zCombobox_actionPerformed(ActionEvent e)\r
195   {\r
196   }\r
197 \r
198   public void eps_actionPerformed(ActionEvent e)\r
199   {\r
200 \r
201   }\r
202 \r
203   public void png_actionPerformed(ActionEvent e)\r
204   {\r
205 \r
206   }\r
207 \r
208   public void outputValues_actionPerformed(ActionEvent e)\r
209   {\r
210 \r
211   }\r
212 \r
213   public void print_actionPerformed(ActionEvent e)\r
214   {\r
215 \r
216   }\r
217 \r
218   public void showLabels_actionPerformed(ActionEvent e)\r
219   {\r
220 \r
221   }\r
222 \r
223   public void bgcolour_actionPerformed(ActionEvent e)\r
224   {\r
225 \r
226   }\r
227 \r
228   public void originalSeqData_actionPerformed(ActionEvent e)\r
229   {\r
230 \r
231   }\r
232 }\r