2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
3 * Copyright (C) 2009 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.*;
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 protected JMenu viewMenu = new JMenu();
62 protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
64 JMenuItem bgcolour = new JMenuItem();
66 JMenuItem originalSeqData = new JMenuItem();
68 protected JMenu associateViewsMenu = new JMenu();
80 for (int i = 1; i < 8; i++)
82 xCombobox.addItem("dim " + i);
83 yCombobox.addItem("dim " + i);
84 zCombobox.addItem("dim " + i);
87 setJMenuBar(jMenuBar1);
90 private void jbInit() throws Exception
92 this.getContentPane().setLayout(borderLayout1);
93 jPanel2.setLayout(flowLayout1);
94 jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
95 jLabel1.setText("x=");
96 jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
97 jLabel2.setText("y=");
98 jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
99 jLabel3.setText("z=");
100 jPanel2.setBackground(Color.white);
101 jPanel2.setBorder(null);
102 zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
103 zCombobox.addActionListener(new java.awt.event.ActionListener()
105 public void actionPerformed(ActionEvent e)
107 zCombobox_actionPerformed(e);
110 yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
111 yCombobox.addActionListener(new java.awt.event.ActionListener()
113 public void actionPerformed(ActionEvent e)
115 yCombobox_actionPerformed(e);
118 xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
119 xCombobox.addActionListener(new java.awt.event.ActionListener()
121 public void actionPerformed(ActionEvent e)
123 xCombobox_actionPerformed(e);
126 fileMenu.setText("File");
127 saveMenu.setText("Save as");
129 eps.addActionListener(new ActionListener()
131 public void actionPerformed(ActionEvent e)
133 eps_actionPerformed(e);
137 png.addActionListener(new ActionListener()
139 public void actionPerformed(ActionEvent e)
141 png_actionPerformed(e);
144 outputValues.setText("Output Values...");
145 outputValues.addActionListener(new ActionListener()
147 public void actionPerformed(ActionEvent e)
149 outputValues_actionPerformed(e);
152 print.addActionListener(new ActionListener()
154 public void actionPerformed(ActionEvent e)
156 print_actionPerformed(e);
159 viewMenu.setText("View");
160 viewMenu.addMenuListener(new MenuListener()
162 public void menuSelected(MenuEvent e)
164 viewMenu_menuSelected();
167 public void menuDeselected(MenuEvent e)
171 public void menuCanceled(MenuEvent e)
175 showLabels.setText("Show Labels");
176 showLabels.addActionListener(new ActionListener()
178 public void actionPerformed(ActionEvent e)
180 showLabels_actionPerformed(e);
183 print.setText("Print");
184 bgcolour.setText("Background Colour...");
185 bgcolour.addActionListener(new ActionListener()
187 public void actionPerformed(ActionEvent e)
189 bgcolour_actionPerformed(e);
192 originalSeqData.setText("Input Data...");
193 originalSeqData.addActionListener(new ActionListener()
195 public void actionPerformed(ActionEvent e)
197 originalSeqData_actionPerformed(e);
200 associateViewsMenu.setText("Associate Nodes With");
201 this.getContentPane().add(jPanel2, BorderLayout.SOUTH);
202 jPanel2.add(jLabel1, null);
203 jPanel2.add(xCombobox, null);
204 jPanel2.add(jLabel2, null);
205 jPanel2.add(yCombobox, null);
206 jPanel2.add(jLabel3, null);
207 jPanel2.add(zCombobox, null);
208 jMenuBar1.add(fileMenu);
209 jMenuBar1.add(viewMenu);
210 fileMenu.add(saveMenu);
211 fileMenu.add(outputValues);
213 fileMenu.add(originalSeqData);
216 viewMenu.add(showLabels);
217 viewMenu.add(bgcolour);
218 viewMenu.add(associateViewsMenu);
221 protected void xCombobox_actionPerformed(ActionEvent e)
225 protected void yCombobox_actionPerformed(ActionEvent e)
229 protected void zCombobox_actionPerformed(ActionEvent e)
233 public void eps_actionPerformed(ActionEvent e)
238 public void png_actionPerformed(ActionEvent e)
243 public void outputValues_actionPerformed(ActionEvent e)
248 public void print_actionPerformed(ActionEvent e)
253 public void showLabels_actionPerformed(ActionEvent e)
258 public void bgcolour_actionPerformed(ActionEvent e)
263 public void originalSeqData_actionPerformed(ActionEvent e)
268 public void viewMenu_menuSelected()