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.ActionListener;
23 import java.awt.event.ActionEvent;
25 public class GStructureViewer extends JInternalFrame
27 public GStructureViewer()
32 } catch (Exception ex)
38 private void jbInit() throws Exception
40 this.setJMenuBar(menuBar);
41 fileMenu.setText("File");
42 savemenu.setActionCommand("Save Image");
43 savemenu.setText("Save As");
44 pdbFile.setText("PDB File");
45 pdbFile.addActionListener(new ActionListener()
47 public void actionPerformed(ActionEvent actionEvent)
49 pdbFile_actionPerformed(actionEvent);
53 png.addActionListener(new ActionListener()
55 public void actionPerformed(ActionEvent actionEvent)
57 png_actionPerformed(actionEvent);
61 eps.addActionListener(new ActionListener()
63 public void actionPerformed(ActionEvent actionEvent)
65 eps_actionPerformed(actionEvent);
68 viewMapping.setText("View Mapping");
69 viewMapping.addActionListener(new ActionListener()
71 public void actionPerformed(ActionEvent actionEvent)
73 viewMapping_actionPerformed(actionEvent);
76 viewMenu.setText("View");
77 chainMenu.setText("Show Chain");
78 colourMenu.setText("Colours");
79 backGround.setText("Background Colour...");
80 backGround.addActionListener(new ActionListener()
82 public void actionPerformed(ActionEvent actionEvent)
84 backGround_actionPerformed(actionEvent);
87 seqColour.setSelected(true);
88 seqColour.setText("By Sequence");
89 seqColour.addActionListener(new ActionListener()
91 public void actionPerformed(ActionEvent actionEvent)
93 seqColour_actionPerformed(actionEvent);
96 chainColour.setText("By Chain");
97 chainColour.addActionListener(new ActionListener()
99 public void actionPerformed(ActionEvent actionEvent)
101 chainColour_actionPerformed(actionEvent);
104 chargeColour.setText("Charge & Cysteine");
105 chargeColour.addActionListener(new ActionListener()
107 public void actionPerformed(ActionEvent actionEvent)
109 chargeColour_actionPerformed(actionEvent);
112 zappoColour.setText("Zappo");
113 zappoColour.addActionListener(new ActionListener()
115 public void actionPerformed(ActionEvent actionEvent)
117 zappoColour_actionPerformed(actionEvent);
120 taylorColour.setText("Taylor");
121 taylorColour.addActionListener(new ActionListener()
123 public void actionPerformed(ActionEvent actionEvent)
125 taylorColour_actionPerformed(actionEvent);
128 hydroColour.setText("Hydro");
129 hydroColour.addActionListener(new ActionListener()
131 public void actionPerformed(ActionEvent actionEvent)
133 hydroColour_actionPerformed(actionEvent);
136 strandColour.setText("Strand");
137 strandColour.addActionListener(new ActionListener()
139 public void actionPerformed(ActionEvent actionEvent)
141 strandColour_actionPerformed(actionEvent);
144 helixColour.setText("Helix Propensity");
145 helixColour.addActionListener(new ActionListener()
147 public void actionPerformed(ActionEvent actionEvent)
149 helixColour_actionPerformed(actionEvent);
152 turnColour.setText("Turn Propensity");
153 turnColour.addActionListener(new ActionListener()
155 public void actionPerformed(ActionEvent actionEvent)
157 turnColour_actionPerformed(actionEvent);
160 buriedColour.setText("Buried Index");
161 buriedColour.addActionListener(new ActionListener()
163 public void actionPerformed(ActionEvent actionEvent)
165 buriedColour_actionPerformed(actionEvent);
168 userColour.setText("User Defined ...");
169 userColour.addActionListener(new ActionListener()
171 public void actionPerformed(ActionEvent actionEvent)
173 userColour_actionPerformed(actionEvent);
176 helpMenu.setText("Help");
177 jmolHelp.setText("Jmol Help");
178 jmolHelp.addActionListener(new ActionListener()
180 public void actionPerformed(ActionEvent actionEvent)
182 jmolHelp_actionPerformed(actionEvent);
185 menuBar.add(fileMenu);
186 menuBar.add(viewMenu);
187 menuBar.add(colourMenu);
188 menuBar.add(helpMenu);
189 fileMenu.add(savemenu);
190 fileMenu.add(viewMapping);
191 savemenu.add(pdbFile);
194 viewMenu.add(chainMenu);
195 colourMenu.add(seqColour);
196 colourMenu.add(chainColour);
197 colourMenu.add(chargeColour);
198 colourMenu.add(zappoColour);
199 colourMenu.add(taylorColour);
200 colourMenu.add(hydroColour);
201 colourMenu.add(helixColour);
202 colourMenu.add(strandColour);
203 colourMenu.add(turnColour);
204 colourMenu.add(buriedColour);
205 colourMenu.add(userColour);
206 colourMenu.add(backGround);
207 helpMenu.add(jmolHelp);
210 JMenuBar menuBar = new JMenuBar();
212 JMenu fileMenu = new JMenu();
214 JMenu savemenu = new JMenu();
216 JMenuItem pdbFile = new JMenuItem();
218 JMenuItem png = new JMenuItem();
220 JMenuItem eps = new JMenuItem();
222 JMenuItem viewMapping = new JMenuItem();
224 JMenu viewMenu = new JMenu();
226 protected JMenu chainMenu = new JMenu();
228 JMenu jMenu1 = new JMenu();
230 JMenu colourMenu = new JMenu();
232 JMenuItem backGround = new JMenuItem();
234 protected JCheckBoxMenuItem seqColour = new JCheckBoxMenuItem();
236 JMenuItem chainColour = new JMenuItem();
238 JMenuItem chargeColour = new JMenuItem();
240 JMenuItem zappoColour = new JMenuItem();
242 JMenuItem taylorColour = new JMenuItem();
244 JMenuItem hydroColour = new JMenuItem();
246 JMenuItem strandColour = new JMenuItem();
248 JMenuItem helixColour = new JMenuItem();
250 JMenuItem turnColour = new JMenuItem();
252 JMenuItem buriedColour = new JMenuItem();
254 JMenuItem userColour = new JMenuItem();
256 JMenu helpMenu = new JMenu();
258 JMenuItem jmolHelp = new JMenuItem();
260 public void pdbFile_actionPerformed(ActionEvent actionEvent)
265 public void png_actionPerformed(ActionEvent actionEvent)
270 public void eps_actionPerformed(ActionEvent actionEvent)
275 public void viewMapping_actionPerformed(ActionEvent actionEvent)
280 public void seqColour_actionPerformed(ActionEvent actionEvent)
285 public void chainColour_actionPerformed(ActionEvent actionEvent)
290 public void chargeColour_actionPerformed(ActionEvent actionEvent)
295 public void zappoColour_actionPerformed(ActionEvent actionEvent)
300 public void taylorColour_actionPerformed(ActionEvent actionEvent)
305 public void hydroColour_actionPerformed(ActionEvent actionEvent)
310 public void helixColour_actionPerformed(ActionEvent actionEvent)
315 public void strandColour_actionPerformed(ActionEvent actionEvent)
320 public void turnColour_actionPerformed(ActionEvent actionEvent)
325 public void buriedColour_actionPerformed(ActionEvent actionEvent)
330 public void userColour_actionPerformed(ActionEvent actionEvent)
335 public void backGround_actionPerformed(ActionEvent actionEvent)
340 public void jmolHelp_actionPerformed(ActionEvent actionEvent)