2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\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
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
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
19 package jalview.jbgui;
\r
22 import java.awt.event.*;
\r
23 import javax.swing.*;
\r
25 public class GPCAPanel
\r
26 extends JInternalFrame
\r
28 JPanel jPanel2 = new JPanel();
\r
29 JLabel jLabel1 = new JLabel();
\r
30 JLabel jLabel2 = new JLabel();
\r
31 JLabel jLabel3 = new JLabel();
\r
32 protected JComboBox xCombobox = new JComboBox();
\r
33 protected JComboBox yCombobox = new JComboBox();
\r
34 protected JComboBox zCombobox = new JComboBox();
\r
35 FlowLayout flowLayout1 = new FlowLayout();
\r
36 BorderLayout borderLayout1 = new BorderLayout();
\r
37 JMenuBar jMenuBar1 = new JMenuBar();
\r
38 JMenu fileMenu = new JMenu();
\r
39 JMenu saveMenu = new JMenu();
\r
40 JMenuItem eps = new JMenuItem();
\r
41 JMenuItem png = new JMenuItem();
\r
42 JMenuItem print = new JMenuItem();
\r
43 JMenuItem outputValues = new JMenuItem();
\r
44 JMenu viewMenu = new JMenu();
\r
45 protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
\r
46 JMenuItem bgcolour = new JMenuItem();
\r
47 JMenuItem originalSeqData = new JMenuItem();
\r
57 e.printStackTrace();
\r
60 for (int i = 1; i < 8; i++)
\r
62 xCombobox.addItem("dim " + i);
\r
63 yCombobox.addItem("dim " + i);
\r
64 zCombobox.addItem("dim " + i);
\r
68 setJMenuBar(jMenuBar1);
\r
71 private void jbInit()
\r
74 this.getContentPane().setLayout(borderLayout1);
\r
75 jPanel2.setLayout(flowLayout1);
\r
76 jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
\r
77 jLabel1.setText("x=");
\r
78 jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
\r
79 jLabel2.setText("y=");
\r
80 jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
\r
81 jLabel3.setText("z=");
\r
82 jPanel2.setBackground(Color.white);
\r
83 jPanel2.setBorder(null);
\r
84 zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
\r
85 zCombobox.addActionListener(new java.awt.event.ActionListener()
\r
87 public void actionPerformed(ActionEvent e)
\r
89 zCombobox_actionPerformed(e);
\r
92 yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
\r
93 yCombobox.addActionListener(new java.awt.event.ActionListener()
\r
95 public void actionPerformed(ActionEvent e)
\r
97 yCombobox_actionPerformed(e);
\r
100 xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
\r
101 xCombobox.addActionListener(new java.awt.event.ActionListener()
\r
103 public void actionPerformed(ActionEvent e)
\r
105 xCombobox_actionPerformed(e);
\r
108 fileMenu.setText("File");
\r
109 saveMenu.setText("Save as");
\r
110 eps.setText("EPS");
\r
111 eps.addActionListener(new ActionListener()
\r
113 public void actionPerformed(ActionEvent e)
\r
115 eps_actionPerformed(e);
\r
118 png.setText("PNG");
\r
119 png.addActionListener(new ActionListener()
\r
121 public void actionPerformed(ActionEvent e)
\r
123 png_actionPerformed(e);
\r
126 outputValues.setText("Output Values...");
\r
127 outputValues.addActionListener(new ActionListener()
\r
129 public void actionPerformed(ActionEvent e)
\r
131 outputValues_actionPerformed(e);
\r
134 print.addActionListener(new ActionListener()
\r
136 public void actionPerformed(ActionEvent e)
\r
138 print_actionPerformed(e);
\r
141 viewMenu.setText("View");
\r
142 showLabels.setText("Show Labels");
\r
143 showLabels.addActionListener(new ActionListener()
\r
145 public void actionPerformed(ActionEvent e)
\r
147 showLabels_actionPerformed(e);
\r
150 print.setText("Print");
\r
151 bgcolour.setText("Background Colour...");
\r
152 bgcolour.addActionListener(new ActionListener()
\r
154 public void actionPerformed(ActionEvent e)
\r
156 bgcolour_actionPerformed(e);
\r
159 originalSeqData.setText("PCA was made from this...");
\r
160 originalSeqData.addActionListener(new ActionListener()
\r
162 public void actionPerformed(ActionEvent e)
\r
164 originalSeqData_actionPerformed(e);
\r
167 this.getContentPane().add(jPanel2, BorderLayout.SOUTH);
\r
168 jPanel2.add(jLabel1, null);
\r
169 jPanel2.add(xCombobox, null);
\r
170 jPanel2.add(jLabel2, null);
\r
171 jPanel2.add(yCombobox, null);
\r
172 jPanel2.add(jLabel3, null);
\r
173 jPanel2.add(zCombobox, null);
\r
174 jMenuBar1.add(fileMenu);
\r
175 jMenuBar1.add(viewMenu);
\r
176 fileMenu.add(saveMenu);
\r
177 fileMenu.add(outputValues);
\r
178 fileMenu.add(print);
\r
179 fileMenu.add(originalSeqData);
\r
182 viewMenu.add(showLabels);
\r
183 viewMenu.add(bgcolour);
\r
186 protected void xCombobox_actionPerformed(ActionEvent e)
\r
190 protected void yCombobox_actionPerformed(ActionEvent e)
\r
194 protected void zCombobox_actionPerformed(ActionEvent e)
\r
198 public void eps_actionPerformed(ActionEvent e)
\r
203 public void png_actionPerformed(ActionEvent e)
\r
208 public void outputValues_actionPerformed(ActionEvent e)
\r
213 public void print_actionPerformed(ActionEvent e)
\r
218 public void showLabels_actionPerformed(ActionEvent e)
\r
223 public void bgcolour_actionPerformed(ActionEvent e)
\r
228 public void originalSeqData_actionPerformed(ActionEvent e)
\r