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.*;
23 import javax.swing.event.*;
25 public class GPCAPanel extends JInternalFrame
27 JPanel jPanel2 = new JPanel();
29 JLabel jLabel1 = new JLabel();
31 JLabel jLabel2 = new JLabel();
33 JLabel jLabel3 = new JLabel();
35 protected JComboBox xCombobox = new JComboBox();
37 protected JComboBox yCombobox = new JComboBox();
39 protected JComboBox zCombobox = new JComboBox();
41 FlowLayout flowLayout1 = new FlowLayout();
43 BorderLayout borderLayout1 = new BorderLayout();
45 JMenuBar jMenuBar1 = new JMenuBar();
47 JMenu fileMenu = new JMenu();
49 JMenu saveMenu = new JMenu();
51 JMenuItem eps = new JMenuItem();
53 JMenuItem png = new JMenuItem();
55 JMenuItem print = new JMenuItem();
57 JMenuItem outputValues = new JMenuItem();
59 protected JMenu viewMenu = new JMenu();
61 protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
63 JMenuItem bgcolour = new JMenuItem();
65 JMenuItem originalSeqData = new JMenuItem();
67 protected JMenu associateViewsMenu = new JMenu();
79 for (int i = 1; i < 8; i++)
81 xCombobox.addItem("dim " + i);
82 yCombobox.addItem("dim " + i);
83 zCombobox.addItem("dim " + i);
86 setJMenuBar(jMenuBar1);
89 private void jbInit() throws Exception
91 this.getContentPane().setLayout(borderLayout1);
92 jPanel2.setLayout(flowLayout1);
93 jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
94 jLabel1.setText("x=");
95 jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
96 jLabel2.setText("y=");
97 jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
98 jLabel3.setText("z=");
99 jPanel2.setBackground(Color.white);
100 jPanel2.setBorder(null);
101 zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
102 zCombobox.addActionListener(new java.awt.event.ActionListener()
104 public void actionPerformed(ActionEvent e)
106 zCombobox_actionPerformed(e);
109 yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
110 yCombobox.addActionListener(new java.awt.event.ActionListener()
112 public void actionPerformed(ActionEvent e)
114 yCombobox_actionPerformed(e);
117 xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
118 xCombobox.addActionListener(new java.awt.event.ActionListener()
120 public void actionPerformed(ActionEvent e)
122 xCombobox_actionPerformed(e);
125 fileMenu.setText("File");
126 saveMenu.setText("Save as");
128 eps.addActionListener(new ActionListener()
130 public void actionPerformed(ActionEvent e)
132 eps_actionPerformed(e);
136 png.addActionListener(new ActionListener()
138 public void actionPerformed(ActionEvent e)
140 png_actionPerformed(e);
143 outputValues.setText("Output Values...");
144 outputValues.addActionListener(new ActionListener()
146 public void actionPerformed(ActionEvent e)
148 outputValues_actionPerformed(e);
151 print.addActionListener(new ActionListener()
153 public void actionPerformed(ActionEvent e)
155 print_actionPerformed(e);
158 viewMenu.setText("View");
159 viewMenu.addMenuListener(new MenuListener()
161 public void menuSelected(MenuEvent e)
163 viewMenu_menuSelected();
166 public void menuDeselected(MenuEvent e)
170 public void menuCanceled(MenuEvent e)
174 showLabels.setText("Show Labels");
175 showLabels.addActionListener(new ActionListener()
177 public void actionPerformed(ActionEvent e)
179 showLabels_actionPerformed(e);
182 print.setText("Print");
183 bgcolour.setText("Background Colour...");
184 bgcolour.addActionListener(new ActionListener()
186 public void actionPerformed(ActionEvent e)
188 bgcolour_actionPerformed(e);
191 originalSeqData.setText("Input Data...");
192 originalSeqData.addActionListener(new ActionListener()
194 public void actionPerformed(ActionEvent e)
196 originalSeqData_actionPerformed(e);
199 associateViewsMenu.setText("Associate Nodes With");
200 this.getContentPane().add(jPanel2, BorderLayout.SOUTH);
201 jPanel2.add(jLabel1, null);
202 jPanel2.add(xCombobox, null);
203 jPanel2.add(jLabel2, null);
204 jPanel2.add(yCombobox, null);
205 jPanel2.add(jLabel3, null);
206 jPanel2.add(zCombobox, null);
207 jMenuBar1.add(fileMenu);
208 jMenuBar1.add(viewMenu);
209 fileMenu.add(saveMenu);
210 fileMenu.add(outputValues);
212 fileMenu.add(originalSeqData);
215 viewMenu.add(showLabels);
216 viewMenu.add(bgcolour);
217 viewMenu.add(associateViewsMenu);
220 protected void xCombobox_actionPerformed(ActionEvent e)
224 protected void yCombobox_actionPerformed(ActionEvent e)
228 protected void zCombobox_actionPerformed(ActionEvent e)
232 public void eps_actionPerformed(ActionEvent e)
237 public void png_actionPerformed(ActionEvent e)
242 public void outputValues_actionPerformed(ActionEvent e)
247 public void print_actionPerformed(ActionEvent e)
252 public void showLabels_actionPerformed(ActionEvent e)
257 public void bgcolour_actionPerformed(ActionEvent e)
262 public void originalSeqData_actionPerformed(ActionEvent e)
267 public void viewMenu_menuSelected()