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