/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*/
package MCview;
import jalview.datamodel.*;
import jalview.schemes.*;
-
-public class AppletPDBViewer
- extends EmbmenuFrame implements ActionListener, ItemListener
+public class AppletPDBViewer extends EmbmenuFrame implements
+ ActionListener, ItemListener
{
AppletPDBCanvas pdbcanvas;
- public AppletPDBViewer(PDBEntry pdbentry,
- SequenceI[] seq,
- String [] chains,
- AlignmentPanel ap,
- String protocol)
+ public AppletPDBViewer(PDBEntry pdbentry, SequenceI[] seq,
+ String[] chains, AlignmentPanel ap, String protocol)
{
try
{
jbInit();
- }
- catch (Exception ex)
+ } catch (Exception ex)
{
ex.printStackTrace();
}
embedMenuIfNeeded(pdbcanvas);
add(pdbcanvas, BorderLayout.CENTER);
- StringBuffer title = new StringBuffer(seq[0].getName()
- + ":"
- + pdbcanvas.pdbentry.getFile());
+ StringBuffer title = new StringBuffer(seq[0].getName() + ":"
+ + pdbcanvas.pdbentry.getFile());
jalview.bin.JalviewLite.addFrame(this, title.toString(), 400, 400);
}
-
-
public void actionPerformed(ActionEvent evt)
{
if (evt.getSource() == mapping)
{
- jalview.appletgui.CutAndPasteTransfer cap
- = new jalview.appletgui.CutAndPasteTransfer(false, null);
+ jalview.appletgui.CutAndPasteTransfer cap = new jalview.appletgui.CutAndPasteTransfer(
+ false, null);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping", 500,
- 600);
+ jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping",
+ 500, 600);
cap.setText(pdbcanvas.mappingDetails.toString());
}
}
else if (evt.getSource() == wire)
{
- pdbcanvas.wire = !pdbcanvas.wire;
+ pdbcanvas.wire = !pdbcanvas.wire;
}
else if (evt.getSource() == depth)
{
pdbcanvas.repaint();
}
- private void jbInit()
- throws Exception
+ private void jbInit() throws Exception
{
setMenuBar(jMenuBar1);
fileMenu.setLabel("File");
jMenuBar1.add(fileMenu);
jMenuBar1.add(coloursMenu);
jMenuBar1.add(viewMenu);
- fileMenu.add(mapping); ;
+ fileMenu.add(mapping);
+ ;
coloursMenu.add(seqButton);
coloursMenu.add(chain);
}
MenuBar jMenuBar1 = new MenuBar();
+
Menu fileMenu = new Menu();
+
Menu coloursMenu = new Menu();
+
MenuItem mapping = new MenuItem();
+
CheckboxGroup bg = new CheckboxGroup();
+
CheckboxMenuItem wire = new CheckboxMenuItem();
+
CheckboxMenuItem depth = new CheckboxMenuItem();
+
CheckboxMenuItem zbuffer = new CheckboxMenuItem();
MenuItem charge = new MenuItem();
+
MenuItem hydro = new MenuItem();
+
MenuItem chain = new MenuItem();
+
MenuItem seqButton = new MenuItem();
CheckboxMenuItem allchains = new CheckboxMenuItem();
+
Menu viewMenu = new Menu();
+
MenuItem turn = new MenuItem();
+
MenuItem strand = new MenuItem();
+
MenuItem helix = new MenuItem();
+
MenuItem taylor = new MenuItem();
+
MenuItem zappo = new MenuItem();
- MenuItem buried = new MenuItem();
- MenuItem user = new MenuItem();
+ MenuItem buried = new MenuItem();
-//End StructureListener
-////////////////////////////
+ MenuItem user = new MenuItem();
+ // End StructureListener
+ // //////////////////////////
}