2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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/>.
18 package jalview.jbgui;
21 import java.awt.event.*;
24 import javax.swing.event.*;
26 public class GPCAPanel extends JInternalFrame
28 JPanel jPanel2 = new JPanel();
30 JLabel jLabel1 = new JLabel();
32 JLabel jLabel2 = new JLabel();
34 JLabel jLabel3 = new JLabel();
36 protected JComboBox xCombobox = new JComboBox();
38 protected JComboBox yCombobox = new JComboBox();
40 protected JComboBox zCombobox = new JComboBox();
42 FlowLayout flowLayout1 = new FlowLayout();
44 BorderLayout borderLayout1 = new BorderLayout();
46 JMenuBar jMenuBar1 = new JMenuBar();
48 JMenu fileMenu = new JMenu();
50 JMenu saveMenu = new JMenu();
52 JMenuItem eps = new JMenuItem();
54 JMenuItem png = new JMenuItem();
56 JMenuItem print = new JMenuItem();
58 JMenuItem outputValues = new JMenuItem();
60 JMenuItem outputPoints = new JMenuItem();
62 JMenuItem outputProjPoints = new JMenuItem();
64 protected JMenu viewMenu = new JMenu();
66 protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
68 JMenuItem bgcolour = new JMenuItem();
70 JMenuItem originalSeqData = new JMenuItem();
72 protected JMenu associateViewsMenu = new JMenu();
84 for (int i = 1; i < 8; i++)
86 xCombobox.addItem("dim " + i);
87 yCombobox.addItem("dim " + i);
88 zCombobox.addItem("dim " + i);
91 setJMenuBar(jMenuBar1);
94 private void jbInit() throws Exception
96 this.getContentPane().setLayout(borderLayout1);
97 jPanel2.setLayout(flowLayout1);
98 jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
99 jLabel1.setText("x=");
100 jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
101 jLabel2.setText("y=");
102 jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
103 jLabel3.setText("z=");
104 jPanel2.setBackground(Color.white);
105 jPanel2.setBorder(null);
106 zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
107 zCombobox.addActionListener(new java.awt.event.ActionListener()
109 public void actionPerformed(ActionEvent e)
111 zCombobox_actionPerformed(e);
114 yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
115 yCombobox.addActionListener(new java.awt.event.ActionListener()
117 public void actionPerformed(ActionEvent e)
119 yCombobox_actionPerformed(e);
122 xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
123 xCombobox.addActionListener(new java.awt.event.ActionListener()
125 public void actionPerformed(ActionEvent e)
127 xCombobox_actionPerformed(e);
130 fileMenu.setText("File");
131 saveMenu.setText("Save as");
133 eps.addActionListener(new ActionListener()
135 public void actionPerformed(ActionEvent e)
137 eps_actionPerformed(e);
141 png.addActionListener(new ActionListener()
143 public void actionPerformed(ActionEvent e)
145 png_actionPerformed(e);
148 outputValues.setText("Output Values...");
149 outputValues.addActionListener(new ActionListener()
151 public void actionPerformed(ActionEvent e)
153 outputValues_actionPerformed(e);
156 outputPoints.setText("Output points...");
157 outputPoints.addActionListener(new ActionListener()
159 public void actionPerformed(ActionEvent e)
161 outputPoints_actionPerformed(e);
164 outputProjPoints.setText("Output transformed points...");
165 outputProjPoints.addActionListener(new ActionListener()
167 public void actionPerformed(ActionEvent e)
169 outputProjPoints_actionPerformed(e);
172 print.addActionListener(new ActionListener()
174 public void actionPerformed(ActionEvent e)
176 print_actionPerformed(e);
179 viewMenu.setText("View");
180 viewMenu.addMenuListener(new MenuListener()
182 public void menuSelected(MenuEvent e)
184 viewMenu_menuSelected();
187 public void menuDeselected(MenuEvent e)
191 public void menuCanceled(MenuEvent e)
195 showLabels.setText("Show Labels");
196 showLabels.addActionListener(new ActionListener()
198 public void actionPerformed(ActionEvent e)
200 showLabels_actionPerformed(e);
203 print.setText("Print");
204 bgcolour.setText("Background Colour...");
205 bgcolour.addActionListener(new ActionListener()
207 public void actionPerformed(ActionEvent e)
209 bgcolour_actionPerformed(e);
212 originalSeqData.setText("Input Data...");
213 originalSeqData.addActionListener(new ActionListener()
215 public void actionPerformed(ActionEvent e)
217 originalSeqData_actionPerformed(e);
220 associateViewsMenu.setText("Associate Nodes With");
221 this.getContentPane().add(jPanel2, BorderLayout.SOUTH);
222 jPanel2.add(jLabel1, null);
223 jPanel2.add(xCombobox, null);
224 jPanel2.add(jLabel2, null);
225 jPanel2.add(yCombobox, null);
226 jPanel2.add(jLabel3, null);
227 jPanel2.add(zCombobox, null);
228 jMenuBar1.add(fileMenu);
229 jMenuBar1.add(viewMenu);
230 fileMenu.add(saveMenu);
231 fileMenu.add(outputValues);
233 fileMenu.add(originalSeqData);
234 fileMenu.add(outputPoints);
235 fileMenu.add(outputProjPoints);
238 viewMenu.add(showLabels);
239 viewMenu.add(bgcolour);
240 viewMenu.add(associateViewsMenu);
243 protected void outputPoints_actionPerformed(ActionEvent e)
245 // TODO Auto-generated method stub
249 protected void outputProjPoints_actionPerformed(ActionEvent e)
251 // TODO Auto-generated method stub
255 protected void xCombobox_actionPerformed(ActionEvent e)
259 protected void yCombobox_actionPerformed(ActionEvent e)
263 protected void zCombobox_actionPerformed(ActionEvent e)
267 public void eps_actionPerformed(ActionEvent e)
272 public void png_actionPerformed(ActionEvent e)
277 public void outputValues_actionPerformed(ActionEvent e)
282 public void print_actionPerformed(ActionEvent e)
287 public void showLabels_actionPerformed(ActionEvent e)
292 public void bgcolour_actionPerformed(ActionEvent e)
297 public void originalSeqData_actionPerformed(ActionEvent e)
302 public void viewMenu_menuSelected()