jmol added
[jalview.git] / src / jalview / jbgui / GStructureViewer.java
1 /*\r
2  * Jalview - A Sequence Alignment Editor and Viewer\r
3  * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4  *\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
9  *\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
14  *\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
18  */\r
19 \r
20 package jalview.jbgui;\r
21 \r
22 import javax.swing.*;\r
23 import java.awt.event.ActionListener;\r
24 import java.awt.event.ActionEvent;\r
25 \r
26 public class GStructureViewer  extends JInternalFrame\r
27 {\r
28   public GStructureViewer()\r
29   {\r
30     try\r
31     {\r
32       jbInit();\r
33     }\r
34     catch (Exception ex)\r
35     {\r
36       ex.printStackTrace();\r
37     }\r
38   }\r
39 \r
40   private void jbInit()\r
41       throws Exception\r
42   {\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
49     {\r
50       public void actionPerformed(ActionEvent actionEvent)\r
51       {\r
52         pdbFile_actionPerformed(actionEvent);\r
53       }\r
54     });\r
55     png.setText("PNG");\r
56     png.addActionListener(new ActionListener()\r
57     {\r
58       public void actionPerformed(ActionEvent actionEvent)\r
59       {\r
60         png_actionPerformed(actionEvent);\r
61       }\r
62     });\r
63     eps.setText("EPS");\r
64     eps.addActionListener(new ActionListener()\r
65     {\r
66       public void actionPerformed(ActionEvent actionEvent)\r
67       {\r
68         eps_actionPerformed(actionEvent);\r
69       }\r
70     });\r
71     viewMapping.setText("View Mapping");\r
72     viewMapping.addActionListener(new ActionListener()\r
73     {\r
74       public void actionPerformed(ActionEvent actionEvent)\r
75       {\r
76         viewMapping_actionPerformed(actionEvent);\r
77       }\r
78     });\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
86     savemenu.add(png);\r
87     savemenu.add(eps);\r
88     viewMenu.add(chainMenu);\r
89   }\r
90 \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
102   {\r
103 \r
104   }\r
105 \r
106   public void png_actionPerformed(ActionEvent actionEvent)\r
107   {\r
108 \r
109   }\r
110 \r
111   public void eps_actionPerformed(ActionEvent actionEvent)\r
112   {\r
113 \r
114   }\r
115 \r
116   public void viewMapping_actionPerformed(ActionEvent actionEvent)\r
117   {\r
118 \r
119   }\r
120 }\r