2 * Jalview - A Sequence Alignment Editor and Viewer
3 * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
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.
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.
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
19 package jalview.jbgui;
22 import java.awt.event.*;
25 public class GPCAPanel
26 extends JInternalFrame
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();
60 for (int i = 1; i < 8; i++)
62 xCombobox.addItem("dim " + i);
63 yCombobox.addItem("dim " + i);
64 zCombobox.addItem("dim " + i);
68 setJMenuBar(jMenuBar1);
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()
87 public void actionPerformed(ActionEvent e)
89 zCombobox_actionPerformed(e);
92 yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
93 yCombobox.addActionListener(new java.awt.event.ActionListener()
95 public void actionPerformed(ActionEvent e)
97 yCombobox_actionPerformed(e);
100 xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
101 xCombobox.addActionListener(new java.awt.event.ActionListener()
103 public void actionPerformed(ActionEvent e)
105 xCombobox_actionPerformed(e);
108 fileMenu.setText("File");
109 saveMenu.setText("Save as");
111 eps.addActionListener(new ActionListener()
113 public void actionPerformed(ActionEvent e)
115 eps_actionPerformed(e);
119 png.addActionListener(new ActionListener()
121 public void actionPerformed(ActionEvent e)
123 png_actionPerformed(e);
126 outputValues.setText("Output Values...");
127 outputValues.addActionListener(new ActionListener()
129 public void actionPerformed(ActionEvent e)
131 outputValues_actionPerformed(e);
134 print.addActionListener(new ActionListener()
136 public void actionPerformed(ActionEvent e)
138 print_actionPerformed(e);
141 viewMenu.setText("View");
142 showLabels.setText("Show Labels");
143 showLabels.addActionListener(new ActionListener()
145 public void actionPerformed(ActionEvent e)
147 showLabels_actionPerformed(e);
150 print.setText("Print");
151 bgcolour.setText("Background Colour...");
152 bgcolour.addActionListener(new ActionListener()
154 public void actionPerformed(ActionEvent e)
156 bgcolour_actionPerformed(e);
159 originalSeqData.setText("Input Data...");
160 originalSeqData.addActionListener(new ActionListener()
162 public void actionPerformed(ActionEvent e)
164 originalSeqData_actionPerformed(e);
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);
179 fileMenu.add(originalSeqData);
182 viewMenu.add(showLabels);
183 viewMenu.add(bgcolour);
186 protected void xCombobox_actionPerformed(ActionEvent e)
190 protected void yCombobox_actionPerformed(ActionEvent e)
194 protected void zCombobox_actionPerformed(ActionEvent e)
198 public void eps_actionPerformed(ActionEvent e)
203 public void png_actionPerformed(ActionEvent e)
208 public void outputValues_actionPerformed(ActionEvent e)
213 public void print_actionPerformed(ActionEvent e)
218 public void showLabels_actionPerformed(ActionEvent e)
223 public void bgcolour_actionPerformed(ActionEvent e)
228 public void originalSeqData_actionPerformed(ActionEvent e)