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