X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGPCAPanel.java;h=0f88b759c80d2b2abfc3f712942eecae10049661;hb=7749f0e593d610c517dfd6796cf6087191b189ad;hp=7fc21a9233dd5d278b4528de261c29ed5cd079dd;hpb=efc31b4a8d5cee63555586804a2b79c06bdb5a14;p=jalview.git diff --git a/src/jalview/jbgui/GPCAPanel.java b/src/jalview/jbgui/GPCAPanel.java index 7fc21a9..0f88b75 100755 --- a/src/jalview/jbgui/GPCAPanel.java +++ b/src/jalview/jbgui/GPCAPanel.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2006 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 @@ -23,7 +23,7 @@ import java.awt.event.*; import javax.swing.*; public class GPCAPanel - extends JPanel + extends JInternalFrame { JPanel jPanel2 = new JPanel(); JLabel jLabel1 = new JLabel(); @@ -34,6 +34,17 @@ public class GPCAPanel protected JComboBox zCombobox = new JComboBox(); FlowLayout flowLayout1 = new FlowLayout(); BorderLayout borderLayout1 = new BorderLayout(); + JMenuBar jMenuBar1 = new JMenuBar(); + JMenu fileMenu = new JMenu(); + JMenu saveMenu = new JMenu(); + JMenuItem eps = new JMenuItem(); + JMenuItem png = new JMenuItem(); + JMenuItem print = new JMenuItem(); + JMenuItem outputValues = new JMenuItem(); + JMenu viewMenu = new JMenu(); + protected JCheckBoxMenuItem showLabels = new JCheckBoxMenuItem(); + JMenuItem bgcolour = new JMenuItem(); + JMenuItem originalSeqData = new JMenuItem(); public GPCAPanel() { @@ -52,12 +63,15 @@ public class GPCAPanel yCombobox.addItem("dim " + i); zCombobox.addItem("dim " + i); } + + + setJMenuBar(jMenuBar1); } private void jbInit() throws Exception { - this.setLayout(borderLayout1); + this.getContentPane().setLayout(borderLayout1); jPanel2.setLayout(flowLayout1); jLabel1.setFont(new java.awt.Font("Verdana", 0, 12)); jLabel1.setText("x="); @@ -91,13 +105,82 @@ public class GPCAPanel xCombobox_actionPerformed(e); } }); - this.add(jPanel2, BorderLayout.SOUTH); + fileMenu.setText("File"); + saveMenu.setText("Save as"); + eps.setText("EPS"); + eps.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + eps_actionPerformed(e); + } + }); + png.setText("PNG"); + png.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + png_actionPerformed(e); + } + }); + outputValues.setText("Output Values..."); + outputValues.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + outputValues_actionPerformed(e); + } + }); + print.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + print_actionPerformed(e); + } + }); + viewMenu.setText("View"); + showLabels.setText("Show Labels"); + showLabels.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + showLabels_actionPerformed(e); + } + }); + print.setText("Print"); + bgcolour.setText("Background Colour..."); + bgcolour.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + bgcolour_actionPerformed(e); + } + }); + originalSeqData.setText("Input Data..."); + originalSeqData.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + originalSeqData_actionPerformed(e); + } + }); + this.getContentPane().add(jPanel2, BorderLayout.SOUTH); jPanel2.add(jLabel1, null); jPanel2.add(xCombobox, null); jPanel2.add(jLabel2, null); jPanel2.add(yCombobox, null); jPanel2.add(jLabel3, null); jPanel2.add(zCombobox, null); + jMenuBar1.add(fileMenu); + jMenuBar1.add(viewMenu); + fileMenu.add(saveMenu); + fileMenu.add(outputValues); + fileMenu.add(print); + fileMenu.add(originalSeqData); + saveMenu.add(eps); + saveMenu.add(png); + viewMenu.add(showLabels); + viewMenu.add(bgcolour); } protected void xCombobox_actionPerformed(ActionEvent e) @@ -111,4 +194,39 @@ public class GPCAPanel protected void zCombobox_actionPerformed(ActionEvent e) { } + + public void eps_actionPerformed(ActionEvent e) + { + + } + + public void png_actionPerformed(ActionEvent e) + { + + } + + public void outputValues_actionPerformed(ActionEvent e) + { + + } + + public void print_actionPerformed(ActionEvent e) + { + + } + + public void showLabels_actionPerformed(ActionEvent e) + { + + } + + public void bgcolour_actionPerformed(ActionEvent e) + { + + } + + public void originalSeqData_actionPerformed(ActionEvent e) + { + + } }