2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, 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();
61 JMenuItem outputProjPoints = new JMenuItem();
63 protected JMenu viewMenu = new JMenu();
65 protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
67 JMenuItem bgcolour = new JMenuItem();
69 JMenuItem originalSeqData = new JMenuItem();
71 protected JMenu associateViewsMenu = new JMenu();
83 for (int i = 1; i < 8; i++)
85 xCombobox.addItem("dim " + i);
86 yCombobox.addItem("dim " + i);
87 zCombobox.addItem("dim " + i);
90 setJMenuBar(jMenuBar1);
93 private void jbInit() throws Exception
95 this.getContentPane().setLayout(borderLayout1);
96 jPanel2.setLayout(flowLayout1);
97 jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
98 jLabel1.setText("x=");
99 jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
100 jLabel2.setText("y=");
101 jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
102 jLabel3.setText("z=");
103 jPanel2.setBackground(Color.white);
104 jPanel2.setBorder(null);
105 zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
106 zCombobox.addActionListener(new java.awt.event.ActionListener()
108 public void actionPerformed(ActionEvent e)
110 zCombobox_actionPerformed(e);
113 yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
114 yCombobox.addActionListener(new java.awt.event.ActionListener()
116 public void actionPerformed(ActionEvent e)
118 yCombobox_actionPerformed(e);
121 xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
122 xCombobox.addActionListener(new java.awt.event.ActionListener()
124 public void actionPerformed(ActionEvent e)
126 xCombobox_actionPerformed(e);
129 fileMenu.setText("File");
130 saveMenu.setText("Save as");
132 eps.addActionListener(new ActionListener()
134 public void actionPerformed(ActionEvent e)
136 eps_actionPerformed(e);
140 png.addActionListener(new ActionListener()
142 public void actionPerformed(ActionEvent e)
144 png_actionPerformed(e);
147 outputValues.setText("Output Values...");
148 outputValues.addActionListener(new ActionListener()
150 public void actionPerformed(ActionEvent e)
152 outputValues_actionPerformed(e);
155 outputPoints.setText("Output points...");
156 outputPoints.addActionListener(new ActionListener()
158 public void actionPerformed(ActionEvent e)
160 outputPoints_actionPerformed(e);
163 outputProjPoints.setText("Output transformed points...");
164 outputProjPoints.addActionListener(new ActionListener()
166 public void actionPerformed(ActionEvent e)
168 outputProjPoints_actionPerformed(e);
171 print.addActionListener(new ActionListener()
173 public void actionPerformed(ActionEvent e)
175 print_actionPerformed(e);
178 viewMenu.setText("View");
179 viewMenu.addMenuListener(new MenuListener()
181 public void menuSelected(MenuEvent e)
183 viewMenu_menuSelected();
186 public void menuDeselected(MenuEvent e)
190 public void menuCanceled(MenuEvent e)
194 showLabels.setText("Show Labels");
195 showLabels.addActionListener(new ActionListener()
197 public void actionPerformed(ActionEvent e)
199 showLabels_actionPerformed(e);
202 print.setText("Print");
203 bgcolour.setText("Background Colour...");
204 bgcolour.addActionListener(new ActionListener()
206 public void actionPerformed(ActionEvent e)
208 bgcolour_actionPerformed(e);
211 originalSeqData.setText("Input Data...");
212 originalSeqData.addActionListener(new ActionListener()
214 public void actionPerformed(ActionEvent e)
216 originalSeqData_actionPerformed(e);
219 associateViewsMenu.setText("Associate Nodes With");
220 this.getContentPane().add(jPanel2, BorderLayout.SOUTH);
221 jPanel2.add(jLabel1, null);
222 jPanel2.add(xCombobox, null);
223 jPanel2.add(jLabel2, null);
224 jPanel2.add(yCombobox, null);
225 jPanel2.add(jLabel3, null);
226 jPanel2.add(zCombobox, null);
227 jMenuBar1.add(fileMenu);
228 jMenuBar1.add(viewMenu);
229 fileMenu.add(saveMenu);
230 fileMenu.add(outputValues);
232 fileMenu.add(originalSeqData);
233 fileMenu.add(outputPoints);
234 fileMenu.add(outputProjPoints);
237 viewMenu.add(showLabels);
238 viewMenu.add(bgcolour);
239 viewMenu.add(associateViewsMenu);
242 protected void outputPoints_actionPerformed(ActionEvent e)
244 // TODO Auto-generated method stub
248 protected void outputProjPoints_actionPerformed(ActionEvent e)
250 // TODO Auto-generated method stub
254 protected void xCombobox_actionPerformed(ActionEvent e)
258 protected void yCombobox_actionPerformed(ActionEvent e)
262 protected void zCombobox_actionPerformed(ActionEvent e)
266 public void eps_actionPerformed(ActionEvent e)
271 public void png_actionPerformed(ActionEvent e)
276 public void outputValues_actionPerformed(ActionEvent e)
281 public void print_actionPerformed(ActionEvent e)
286 public void showLabels_actionPerformed(ActionEvent e)
291 public void bgcolour_actionPerformed(ActionEvent e)
296 public void originalSeqData_actionPerformed(ActionEvent e)
301 public void viewMenu_menuSelected()