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