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