2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.jbgui;
22 import java.awt.event.*;
25 import javax.swing.event.*;
27 public class GPCAPanel extends JInternalFrame
29 JPanel jPanel2 = new JPanel();
31 JLabel jLabel1 = new JLabel();
33 JLabel jLabel2 = new JLabel();
35 JLabel jLabel3 = new JLabel();
37 protected JComboBox xCombobox = new JComboBox();
39 protected JComboBox yCombobox = new JComboBox();
41 protected JComboBox zCombobox = new JComboBox();
43 protected JButton resetButton = new JButton();
45 FlowLayout flowLayout1 = new FlowLayout();
47 BorderLayout borderLayout1 = new BorderLayout();
49 JMenuBar jMenuBar1 = new JMenuBar();
51 JMenu fileMenu = new JMenu();
53 JMenu saveMenu = new JMenu();
55 JMenuItem eps = new JMenuItem();
57 JMenuItem png = new JMenuItem();
59 JMenuItem print = new JMenuItem();
61 JMenuItem outputValues = new JMenuItem();
63 JMenuItem outputPoints = new JMenuItem();
65 JMenuItem outputProjPoints = new JMenuItem();
67 protected JMenu viewMenu = new JMenu();
69 protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
71 JMenuItem bgcolour = new JMenuItem();
73 JMenuItem originalSeqData = new JMenuItem();
75 protected JMenu associateViewsMenu = new JMenu();
77 protected JMenu calcSettings = new JMenu();
79 protected JCheckBoxMenuItem nuclSetting = new JCheckBoxMenuItem();
81 protected JCheckBoxMenuItem protSetting = new JCheckBoxMenuItem();
83 protected JCheckBoxMenuItem jvVersionSetting = new JCheckBoxMenuItem();
85 protected JLabel statusBar = new JLabel();
87 protected GridLayout statusPanelLayout = new GridLayout();
89 protected JPanel statusPanel = new JPanel();
101 for (int i = 1; i < 8; i++)
103 xCombobox.addItem("dim " + i);
104 yCombobox.addItem("dim " + i);
105 zCombobox.addItem("dim " + i);
108 setJMenuBar(jMenuBar1);
111 private void jbInit() throws Exception
113 this.getContentPane().setLayout(borderLayout1);
114 jPanel2.setLayout(flowLayout1);
115 jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
116 jLabel1.setText("x=");
117 jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
118 jLabel2.setText("y=");
119 jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
120 jLabel3.setText("z=");
121 jPanel2.setBackground(Color.white);
122 jPanel2.setBorder(null);
123 zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
124 zCombobox.addActionListener(new java.awt.event.ActionListener()
126 public void actionPerformed(ActionEvent e)
128 zCombobox_actionPerformed(e);
131 yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
132 yCombobox.addActionListener(new java.awt.event.ActionListener()
134 public void actionPerformed(ActionEvent e)
136 yCombobox_actionPerformed(e);
139 xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
140 xCombobox.addActionListener(new java.awt.event.ActionListener()
142 public void actionPerformed(ActionEvent e)
144 xCombobox_actionPerformed(e);
147 resetButton.setFont(new java.awt.Font("Verdana", 0, 12));
148 resetButton.setText("Reset");
149 resetButton.addActionListener(new java.awt.event.ActionListener()
152 public void actionPerformed(ActionEvent e)
154 resetButton_actionPerformed(e);
157 fileMenu.setText("File");
158 saveMenu.setText("Save as");
160 eps.addActionListener(new ActionListener()
162 public void actionPerformed(ActionEvent e)
164 eps_actionPerformed(e);
168 png.addActionListener(new ActionListener()
170 public void actionPerformed(ActionEvent e)
172 png_actionPerformed(e);
175 outputValues.setText("Output Values...");
176 outputValues.addActionListener(new ActionListener()
178 public void actionPerformed(ActionEvent e)
180 outputValues_actionPerformed(e);
183 outputPoints.setText("Output points...");
184 outputPoints.addActionListener(new ActionListener()
186 public void actionPerformed(ActionEvent e)
188 outputPoints_actionPerformed(e);
191 outputProjPoints.setText("Output transformed points...");
192 outputProjPoints.addActionListener(new ActionListener()
194 public void actionPerformed(ActionEvent e)
196 outputProjPoints_actionPerformed(e);
199 print.addActionListener(new ActionListener()
201 public void actionPerformed(ActionEvent e)
203 print_actionPerformed(e);
206 viewMenu.setText("View");
207 viewMenu.addMenuListener(new MenuListener()
209 public void menuSelected(MenuEvent e)
211 viewMenu_menuSelected();
214 public void menuDeselected(MenuEvent e)
218 public void menuCanceled(MenuEvent e)
222 showLabels.setText("Show Labels");
223 showLabels.addActionListener(new ActionListener()
225 public void actionPerformed(ActionEvent e)
227 showLabels_actionPerformed(e);
230 print.setText("Print");
231 bgcolour.setText("Background Colour...");
232 bgcolour.addActionListener(new ActionListener()
234 public void actionPerformed(ActionEvent e)
236 bgcolour_actionPerformed(e);
239 originalSeqData.setText("Input Data...");
240 originalSeqData.addActionListener(new ActionListener()
242 public void actionPerformed(ActionEvent e)
244 originalSeqData_actionPerformed(e);
247 associateViewsMenu.setText("Associate Nodes With");
248 calcSettings.setText("Change Parameters");
249 nuclSetting.setText("Nucleotide matrix");
250 protSetting.setText("Protein matrix");
251 nuclSetting.addActionListener(new ActionListener()
255 public void actionPerformed(ActionEvent arg0)
257 nuclSetting_actionPerfomed(arg0);
260 protSetting.addActionListener(new ActionListener()
264 public void actionPerformed(ActionEvent arg0)
266 protSetting_actionPerfomed(arg0);
269 jvVersionSetting.setText("Jalview PCA Calculation");
270 jvVersionSetting.addActionListener(new ActionListener()
273 public void actionPerformed(ActionEvent arg0)
275 jvVersionSetting_actionPerfomed(arg0);
278 calcSettings.add(jvVersionSetting);
279 calcSettings.add(nuclSetting);
280 calcSettings.add(protSetting);
281 statusPanel.setLayout(statusPanelLayout);
282 statusBar.setFont(new java.awt.Font("Verdana", 0, 12));
283 // statusPanel.setBackground(Color.lightGray);
284 // statusBar.setBackground(Color.lightGray);
285 // statusPanel.add(statusBar, null);
286 JPanel panelBar = new JPanel(new BorderLayout());
287 panelBar.add(jPanel2, BorderLayout.NORTH);
288 panelBar.add(statusPanel, BorderLayout.SOUTH);
289 this.getContentPane().add(panelBar, BorderLayout.SOUTH);
290 jPanel2.add(jLabel1, null);
291 jPanel2.add(xCombobox, null);
292 jPanel2.add(jLabel2, null);
293 jPanel2.add(yCombobox, null);
294 jPanel2.add(jLabel3, null);
295 jPanel2.add(zCombobox, null);
296 jPanel2.add(resetButton, null);
297 jMenuBar1.add(fileMenu);
298 jMenuBar1.add(viewMenu);
299 jMenuBar1.add(calcSettings);
300 fileMenu.add(saveMenu);
301 fileMenu.add(outputValues);
303 fileMenu.add(originalSeqData);
304 fileMenu.add(outputPoints);
305 fileMenu.add(outputProjPoints);
308 viewMenu.add(showLabels);
309 viewMenu.add(bgcolour);
310 viewMenu.add(associateViewsMenu);
313 protected void resetButton_actionPerformed(ActionEvent e)
315 // TODO Auto-generated method stub
319 protected void protSetting_actionPerfomed(ActionEvent arg0)
321 // TODO Auto-generated method stub
325 protected void nuclSetting_actionPerfomed(ActionEvent arg0)
327 // TODO Auto-generated method stub
331 protected void outputPoints_actionPerformed(ActionEvent e)
333 // TODO Auto-generated method stub
337 protected void outputProjPoints_actionPerformed(ActionEvent e)
339 // TODO Auto-generated method stub
343 protected void xCombobox_actionPerformed(ActionEvent e)
347 protected void yCombobox_actionPerformed(ActionEvent e)
351 protected void zCombobox_actionPerformed(ActionEvent e)
355 public void eps_actionPerformed(ActionEvent e)
360 public void png_actionPerformed(ActionEvent e)
365 public void outputValues_actionPerformed(ActionEvent e)
370 public void print_actionPerformed(ActionEvent e)
375 public void showLabels_actionPerformed(ActionEvent e)
380 public void bgcolour_actionPerformed(ActionEvent e)
385 public void originalSeqData_actionPerformed(ActionEvent e)
390 public void viewMenu_menuSelected()
395 protected void jvVersionSetting_actionPerfomed(ActionEvent arg0)
397 // TODO Auto-generated method stub