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 menuBar.add(fileMenu);
\r
82 menuBar.add(viewMenu);
\r
83 fileMenu.add(savemenu);
\r
84 fileMenu.add(viewMapping);
\r
85 savemenu.add(pdbFile);
\r
88 viewMenu.add(chainMenu);
\r
91 JMenuBar menuBar = new JMenuBar();
\r
92 JMenu fileMenu = new JMenu();
\r
93 JMenu savemenu = new JMenu();
\r
94 JMenuItem pdbFile = new JMenuItem();
\r
95 JMenuItem png = new JMenuItem();
\r
96 JMenuItem eps = new JMenuItem();
\r
97 JMenuItem viewMapping = new JMenuItem();
\r
98 JMenu viewMenu = new JMenu();
\r
99 protected JMenu chainMenu = new JMenu();
\r
100 JMenu jMenu1 = new JMenu();
\r
101 public void pdbFile_actionPerformed(ActionEvent actionEvent)
\r
106 public void png_actionPerformed(ActionEvent actionEvent)
\r
111 public void eps_actionPerformed(ActionEvent actionEvent)
\r
116 public void viewMapping_actionPerformed(ActionEvent actionEvent)
\r