From: gmungoc Date: Thu, 4 Jun 2015 12:53:21 +0000 (+0100) Subject: JAL-1753 statusPanel added (for ProgressBar); 'Fit to Window' menu X-Git-Tag: Release_2_10_0~637 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a576517d22220abb490437a02c9b37a1f4c2839e;hp=8f9a21c422709588ddd5893904b47d01244937cd;p=jalview.git JAL-1753 statusPanel added (for ProgressBar); 'Fit to Window' menu option added --- diff --git a/src/jalview/jbgui/GStructureViewer.java b/src/jalview/jbgui/GStructureViewer.java index 5768509..c76fb23 100644 --- a/src/jalview/jbgui/GStructureViewer.java +++ b/src/jalview/jbgui/GStructureViewer.java @@ -20,19 +20,22 @@ */ package jalview.jbgui; -import jalview.api.structures.JalviewStructureDisplayI; -import jalview.util.MessageManager; - +import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ButtonGroup; import javax.swing.JInternalFrame; +import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; +import javax.swing.JPanel; import javax.swing.JRadioButtonMenuItem; +import jalview.api.structures.JalviewStructureDisplayI; +import jalview.util.MessageManager; + public abstract class GStructureViewer extends JInternalFrame implements JalviewStructureDisplayI { @@ -48,6 +51,8 @@ public abstract class GStructureViewer extends JInternalFrame implements protected JMenuItem alignStructs = new JMenuItem(); + protected JMenuItem fitToWindow = new JMenuItem(); + protected JRadioButtonMenuItem seqColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem chainColour = new JRadioButtonMenuItem(); @@ -76,6 +81,10 @@ public abstract class GStructureViewer extends JInternalFrame implements protected JMenuItem helpItem = new JMenuItem(); + protected JLabel statusBar = new JLabel(); + + protected JPanel statusPanel = new JPanel(); + /** * Constructor */ @@ -141,8 +150,18 @@ public abstract class GStructureViewer extends JInternalFrame implements } }); viewMenu.setText(MessageManager.getString("action.view")); + chainMenu.setText(MessageManager.getString("action.show_chain")); + fitToWindow.setText(MessageManager.getString("label.fit_to_window")); + fitToWindow.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent actionEvent) + { + fitToWindow_actionPerformed(); + } + }); + JMenu colourMenu = new JMenu(); colourMenu.setText(MessageManager.getString("label.colours")); @@ -334,6 +353,14 @@ public abstract class GStructureViewer extends JInternalFrame implements helpMenu.add(helpItem); viewerActionMenu.add(alignStructs); + + statusPanel.setLayout(new GridLayout()); + this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH); + statusPanel.add(statusBar, null); + } + + protected void fitToWindow_actionPerformed() + { } protected void viewerColour_actionPerformed(ActionEvent actionEvent)