2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2007 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
20 package jalview.jbgui;
\r
22 import javax.swing.*;
\r
23 import java.awt.event.ActionListener;
\r
24 import java.awt.event.ActionEvent;
\r
26 public class GStructureViewer extends JInternalFrame
\r
28 public GStructureViewer()
\r
34 catch (Exception ex)
\r
36 ex.printStackTrace();
\r
40 private void jbInit()
\r
43 this.setJMenuBar(menuBar);
\r
44 fileMenu.setText("File");
\r
45 savemenu.setActionCommand("Save Image");
\r
46 savemenu.setText("Save As");
\r
47 pdbFile.setText("PDB File");
\r
48 pdbFile.addActionListener(new ActionListener()
\r
50 public void actionPerformed(ActionEvent actionEvent)
\r
52 pdbFile_actionPerformed(actionEvent);
\r
56 png.addActionListener(new ActionListener()
\r
58 public void actionPerformed(ActionEvent actionEvent)
\r
60 png_actionPerformed(actionEvent);
\r
64 eps.addActionListener(new ActionListener()
\r
66 public void actionPerformed(ActionEvent actionEvent)
\r
68 eps_actionPerformed(actionEvent);
\r
71 viewMapping.setText("View Mapping");
\r
72 viewMapping.addActionListener(new ActionListener()
\r
74 public void actionPerformed(ActionEvent actionEvent)
\r
76 viewMapping_actionPerformed(actionEvent);
\r
79 viewMenu.setText("View");
\r
80 chainMenu.setText("Show Chain");
\r
81 colourMenu.setText("Colours");
\r
82 backGround.setText("Background Colour...");
\r
83 backGround.addActionListener(new ActionListener()
\r
85 public void actionPerformed(ActionEvent actionEvent)
\r
87 backGround_actionPerformed(actionEvent);
\r
90 seqColour.setSelected(true);
\r
91 seqColour.setText("By Sequence");
\r
92 seqColour.addActionListener(new ActionListener()
\r
94 public void actionPerformed(ActionEvent actionEvent)
\r
96 seqColour_actionPerformed(actionEvent);
\r
99 chainColour.setText("By Chain");
\r
100 chainColour.addActionListener(new ActionListener()
\r
102 public void actionPerformed(ActionEvent actionEvent)
\r
104 chainColour_actionPerformed(actionEvent);
\r
107 chargeColour.setText("Charge & Cysteine");
\r
108 chargeColour.addActionListener(new ActionListener()
\r
110 public void actionPerformed(ActionEvent actionEvent)
\r
112 chargeColour_actionPerformed(actionEvent);
\r
115 zappoColour.setText("Zappo");
\r
116 zappoColour.addActionListener(new ActionListener()
\r
118 public void actionPerformed(ActionEvent actionEvent)
\r
120 zappoColour_actionPerformed(actionEvent);
\r
123 taylorColour.setText("Taylor");
\r
124 taylorColour.addActionListener(new ActionListener()
\r
126 public void actionPerformed(ActionEvent actionEvent)
\r
128 taylorColour_actionPerformed(actionEvent);
\r
131 hydroColour.setText("Hydro");
\r
132 hydroColour.addActionListener(new ActionListener()
\r
134 public void actionPerformed(ActionEvent actionEvent)
\r
136 hydroColour_actionPerformed(actionEvent);
\r
139 strandColour.setText("Strand");
\r
140 strandColour.addActionListener(new ActionListener()
\r
142 public void actionPerformed(ActionEvent actionEvent)
\r
144 strandColour_actionPerformed(actionEvent);
\r
147 helixColour.setText("Helix Propensity");
\r
148 helixColour.addActionListener(new ActionListener()
\r
150 public void actionPerformed(ActionEvent actionEvent)
\r
152 helixColour_actionPerformed(actionEvent);
\r
155 turnColour.setText("Turn Propensity");
\r
156 turnColour.addActionListener(new ActionListener()
\r
158 public void actionPerformed(ActionEvent actionEvent)
\r
160 turnColour_actionPerformed(actionEvent);
\r
163 buriedColour.setText("Buried Index");
\r
164 buriedColour.addActionListener(new ActionListener()
\r
166 public void actionPerformed(ActionEvent actionEvent)
\r
168 buriedColour_actionPerformed(actionEvent);
\r
171 userColour.setText("User Defined ...");
\r
172 userColour.addActionListener(new ActionListener()
\r
174 public void actionPerformed(ActionEvent actionEvent)
\r
176 userColour_actionPerformed(actionEvent);
\r
179 helpMenu.setText("Help");
\r
180 jmolHelp.setText("Jmol Help");
\r
181 jmolHelp.addActionListener(new ActionListener()
\r
183 public void actionPerformed(ActionEvent actionEvent)
\r
185 jmolHelp_actionPerformed(actionEvent);
\r
188 menuBar.add(fileMenu);
\r
189 menuBar.add(viewMenu);
\r
190 menuBar.add(colourMenu);
\r
191 menuBar.add(helpMenu);
\r
192 fileMenu.add(savemenu);
\r
193 fileMenu.add(viewMapping);
\r
194 savemenu.add(pdbFile);
\r
197 viewMenu.add(chainMenu);
\r
198 colourMenu.add(seqColour);
\r
199 colourMenu.add(chainColour);
\r
200 colourMenu.add(chargeColour);
\r
201 colourMenu.add(zappoColour);
\r
202 colourMenu.add(taylorColour);
\r
203 colourMenu.add(hydroColour);
\r
204 colourMenu.add(helixColour);
\r
205 colourMenu.add(strandColour);
\r
206 colourMenu.add(turnColour);
\r
207 colourMenu.add(buriedColour);
\r
208 colourMenu.add(userColour);
\r
209 colourMenu.add(backGround);
\r
210 helpMenu.add(jmolHelp);
\r
213 JMenuBar menuBar = new JMenuBar();
\r
214 JMenu fileMenu = new JMenu();
\r
215 JMenu savemenu = new JMenu();
\r
216 JMenuItem pdbFile = new JMenuItem();
\r
217 JMenuItem png = new JMenuItem();
\r
218 JMenuItem eps = new JMenuItem();
\r
219 JMenuItem viewMapping = new JMenuItem();
\r
220 JMenu viewMenu = new JMenu();
\r
221 protected JMenu chainMenu = new JMenu();
\r
222 JMenu jMenu1 = new JMenu();
\r
223 JMenu colourMenu = new JMenu();
\r
224 JMenuItem backGround = new JMenuItem();
\r
225 protected JCheckBoxMenuItem seqColour = new JCheckBoxMenuItem();
\r
226 JMenuItem chainColour = new JMenuItem();
\r
227 JMenuItem chargeColour = new JMenuItem();
\r
228 JMenuItem zappoColour = new JMenuItem();
\r
229 JMenuItem taylorColour = new JMenuItem();
\r
230 JMenuItem hydroColour = new JMenuItem();
\r
231 JMenuItem strandColour = new JMenuItem();
\r
232 JMenuItem helixColour = new JMenuItem();
\r
233 JMenuItem turnColour = new JMenuItem();
\r
234 JMenuItem buriedColour = new JMenuItem();
\r
235 JMenuItem userColour = new JMenuItem();
\r
236 JMenu helpMenu = new JMenu();
\r
237 JMenuItem jmolHelp = new JMenuItem();
\r
238 public void pdbFile_actionPerformed(ActionEvent actionEvent)
\r
243 public void png_actionPerformed(ActionEvent actionEvent)
\r
248 public void eps_actionPerformed(ActionEvent actionEvent)
\r
253 public void viewMapping_actionPerformed(ActionEvent actionEvent)
\r
258 public void seqColour_actionPerformed(ActionEvent actionEvent)
\r
263 public void chainColour_actionPerformed(ActionEvent actionEvent)
\r
268 public void chargeColour_actionPerformed(ActionEvent actionEvent)
\r
273 public void zappoColour_actionPerformed(ActionEvent actionEvent)
\r
278 public void taylorColour_actionPerformed(ActionEvent actionEvent)
\r
283 public void hydroColour_actionPerformed(ActionEvent actionEvent)
\r
288 public void helixColour_actionPerformed(ActionEvent actionEvent)
\r
293 public void strandColour_actionPerformed(ActionEvent actionEvent)
\r
298 public void turnColour_actionPerformed(ActionEvent actionEvent)
\r
303 public void buriedColour_actionPerformed(ActionEvent actionEvent)
\r
308 public void userColour_actionPerformed(ActionEvent actionEvent)
\r
313 public void backGround_actionPerformed(ActionEvent actionEvent)
\r
318 public void jmolHelp_actionPerformed(ActionEvent actionEvent)
\r