2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.jbgui;
\r
22 import java.awt.event.*;
\r
23 import javax.swing.*;
\r
25 public class GPCAPanel
\r
26 extends JInternalFrame
\r
28 JPanel jPanel2 = new JPanel();
\r
29 JLabel jLabel1 = new JLabel();
\r
30 JLabel jLabel2 = new JLabel();
\r
31 JLabel jLabel3 = new JLabel();
\r
32 protected JComboBox xCombobox = new JComboBox();
\r
33 protected JComboBox yCombobox = new JComboBox();
\r
34 protected JComboBox zCombobox = new JComboBox();
\r
35 FlowLayout flowLayout1 = new FlowLayout();
\r
36 BorderLayout borderLayout1 = new BorderLayout();
\r
37 JMenuBar jMenuBar1 = new JMenuBar();
\r
38 JMenu fileMenu = new JMenu();
\r
39 JMenu saveMenu = new JMenu();
\r
40 JMenuItem eps = new JMenuItem();
\r
41 JMenuItem png = new JMenuItem();
\r
42 JMenuItem print = new JMenuItem();
\r
43 JMenuItem outputValues = new JMenuItem();
\r
44 JMenu viewMenu = new JMenu();
\r
45 protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem();
\r
46 JMenuItem bgcolour = new JMenuItem();
\r
56 e.printStackTrace();
\r
59 for (int i = 1; i < 8; i++)
\r
61 xCombobox.addItem("dim " + i);
\r
62 yCombobox.addItem("dim " + i);
\r
63 zCombobox.addItem("dim " + i);
\r
67 setJMenuBar(jMenuBar1);
\r
70 private void jbInit()
\r
73 this.getContentPane().setLayout(borderLayout1);
\r
74 jPanel2.setLayout(flowLayout1);
\r
75 jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
\r
76 jLabel1.setText("x=");
\r
77 jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));
\r
78 jLabel2.setText("y=");
\r
79 jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));
\r
80 jLabel3.setText("z=");
\r
81 jPanel2.setBackground(Color.white);
\r
82 jPanel2.setBorder(null);
\r
83 zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
\r
84 zCombobox.addActionListener(new java.awt.event.ActionListener()
\r
86 public void actionPerformed(ActionEvent e)
\r
88 zCombobox_actionPerformed(e);
\r
91 yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
\r
92 yCombobox.addActionListener(new java.awt.event.ActionListener()
\r
94 public void actionPerformed(ActionEvent e)
\r
96 yCombobox_actionPerformed(e);
\r
99 xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));
\r
100 xCombobox.addActionListener(new java.awt.event.ActionListener()
\r
102 public void actionPerformed(ActionEvent e)
\r
104 xCombobox_actionPerformed(e);
\r
107 fileMenu.setText("File");
\r
108 saveMenu.setText("Save as");
\r
109 eps.setText("EPS");
\r
110 eps.addActionListener(new ActionListener()
\r
112 public void actionPerformed(ActionEvent e)
\r
114 eps_actionPerformed(e);
\r
117 png.setText("PNG");
\r
118 png.addActionListener(new ActionListener()
\r
120 public void actionPerformed(ActionEvent e)
\r
122 png_actionPerformed(e);
\r
125 outputValues.setText("Output Values...");
\r
126 outputValues.addActionListener(new ActionListener()
\r
128 public void actionPerformed(ActionEvent e)
\r
130 outputValues_actionPerformed(e);
\r
133 print.addActionListener(new ActionListener()
\r
135 public void actionPerformed(ActionEvent e)
\r
137 print_actionPerformed(e);
\r
140 viewMenu.setText("View");
\r
141 showLabels.setText("Show Labels");
\r
142 showLabels.addActionListener(new ActionListener()
\r
144 public void actionPerformed(ActionEvent e)
\r
146 showLabels_actionPerformed(e);
\r
149 print.setText("Print");
\r
150 bgcolour.setText("Background Colour...");
\r
151 bgcolour.addActionListener(new ActionListener()
\r
153 public void actionPerformed(ActionEvent e)
\r
155 bgcolour_actionPerformed(e);
\r
158 this.getContentPane().add(jPanel2, BorderLayout.SOUTH);
\r
159 jPanel2.add(jLabel1, null);
\r
160 jPanel2.add(xCombobox, null);
\r
161 jPanel2.add(jLabel2, null);
\r
162 jPanel2.add(yCombobox, null);
\r
163 jPanel2.add(jLabel3, null);
\r
164 jPanel2.add(zCombobox, null);
\r
165 jMenuBar1.add(fileMenu);
\r
166 jMenuBar1.add(viewMenu);
\r
167 fileMenu.add(saveMenu);
\r
168 fileMenu.add(outputValues);
\r
169 fileMenu.add(print);
\r
172 viewMenu.add(showLabels);
\r
173 viewMenu.add(bgcolour);
\r
176 protected void xCombobox_actionPerformed(ActionEvent e)
\r
180 protected void yCombobox_actionPerformed(ActionEvent e)
\r
184 protected void zCombobox_actionPerformed(ActionEvent e)
\r
188 public void eps_actionPerformed(ActionEvent e)
\r
193 public void png_actionPerformed(ActionEvent e)
\r
198 public void outputValues_actionPerformed(ActionEvent e)
\r
203 public void print_actionPerformed(ActionEvent e)
\r
208 public void showLabels_actionPerformed(ActionEvent e)
\r
213 public void bgcolour_actionPerformed(ActionEvent e)
\r