GPL license added
[jalview.git] / src / jalview / jbappletgui / GPCAPanel.java
1 /*\r
2 * Jalview - A Sequence Alignment Editor and Viewer\r
3 * Copyright (C) 2005 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 \r
20 package jalview.jbappletgui;\r
21 \r
22 import java.awt.*;\r
23 import java.awt.event.*;\r
24 \r
25 public class GPCAPanel extends Panel\r
26 {\r
27   Panel jPanel2 = new Panel();\r
28   Label jLabel1 = new Label();\r
29   Label jLabel2 = new Label();\r
30   Label jLabel3 = new Label();\r
31   protected Choice xCombobox = new Choice();\r
32   protected Choice yCombobox = new Choice();\r
33   protected Choice zCombobox = new Choice();\r
34   FlowLayout flowLayout1 = new FlowLayout();\r
35   BorderLayout borderLayout1 = new BorderLayout();\r
36 \r
37   public GPCAPanel()\r
38   {\r
39     try\r
40     {\r
41       jbInit();\r
42     }\r
43     catch(Exception e)\r
44     {\r
45       e.printStackTrace();\r
46     }\r
47 \r
48     for(int i=1; i<8; i++)\r
49     {\r
50       xCombobox.addItem("dim "+i);\r
51       yCombobox.addItem("dim "+i);\r
52       zCombobox.addItem("dim "+i);\r
53     }\r
54   }\r
55   private void jbInit() throws Exception\r
56   {\r
57     this.setLayout(borderLayout1);\r
58     jPanel2.setLayout(flowLayout1);\r
59     jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));\r
60     jLabel1.setText("x=");\r
61     jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));\r
62     jLabel2.setText("y=");\r
63     jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));\r
64     jLabel3.setText("z=");\r
65     jPanel2.setBackground(Color.white);\r
66     zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
67     zCombobox.addItemListener(new java.awt.event.ItemListener()\r
68     {\r
69       public void itemStateChanged(ItemEvent e)\r
70       {\r
71         zCombobox_actionPerformed(null);\r
72       }\r
73     });\r
74     yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
75     yCombobox.addItemListener(new java.awt.event.ItemListener()\r
76     {\r
77       public void itemStateChanged(ItemEvent e)\r
78       {\r
79         yCombobox_actionPerformed(null);\r
80       }\r
81     });\r
82     xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
83     xCombobox.addItemListener(new java.awt.event.ItemListener()\r
84     {\r
85       public void itemStateChanged(ItemEvent e)\r
86       {\r
87         xCombobox_actionPerformed(null);\r
88       }\r
89     });\r
90     this.add(jPanel2,  BorderLayout.SOUTH);\r
91     jPanel2.add(jLabel1, null);\r
92     jPanel2.add(xCombobox, null);\r
93     jPanel2.add(jLabel2, null);\r
94     jPanel2.add(yCombobox, null);\r
95     jPanel2.add(jLabel3, null);\r
96     jPanel2.add(zCombobox, null);\r
97   }\r
98 \r
99   protected void xCombobox_actionPerformed(ActionEvent e)\r
100   {\r
101 \r
102   }\r
103 \r
104   protected void yCombobox_actionPerformed(ActionEvent e)\r
105   {\r
106 \r
107   }\r
108 \r
109   protected void zCombobox_actionPerformed(ActionEvent e)\r
110   {\r
111 \r
112   }\r
113 \r
114 }\r