X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGPCAPanel.java;h=a142d5bb35c898492ad95378dd8c940323a40db9;hb=d4cf3b864ffb4d148389a3cdb788e43efd4e4b47;hp=7fc21a9233dd5d278b4528de261c29ed5cd079dd;hpb=83b24eab35785ea8473763ea5ed175a1fa63a4d1;p=jalview.git diff --git a/src/jalview/jbgui/GPCAPanel.java b/src/jalview/jbgui/GPCAPanel.java index 7fc21a9..a142d5b 100755 --- a/src/jalview/jbgui/GPCAPanel.java +++ b/src/jalview/jbgui/GPCAPanel.java @@ -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,16 @@ 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(); public GPCAPanel() { @@ -52,12 +62,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 +104,73 @@ 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); + } + }); + 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); + saveMenu.add(eps); + saveMenu.add(png); + viewMenu.add(showLabels); + viewMenu.add(bgcolour); } protected void xCombobox_actionPerformed(ActionEvent e) @@ -111,4 +184,34 @@ 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) + { + + } }