X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGStructureViewer.java;h=56481acc12388e66763c7485eb05792819fe3a82;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=05826a20a2efecadc16517b74252a28358a5a924;hpb=25aaaa87042b3f507ad4348120df7dd073182759;p=jalview.git diff --git a/src/jalview/jbgui/GStructureViewer.java b/src/jalview/jbgui/GStructureViewer.java index 05826a2..56481ac 100644 --- a/src/jalview/jbgui/GStructureViewer.java +++ b/src/jalview/jbgui/GStructureViewer.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -23,14 +23,17 @@ 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; public abstract class GStructureViewer extends JInternalFrame implements @@ -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,14 +150,24 @@ 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")); JMenuItem backGround = new JMenuItem(); - backGround.setText(MessageManager.getString("label.background_colour") - + "..."); + backGround + .setText(MessageManager.getString("action.background_colour")); backGround.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) @@ -329,11 +348,20 @@ public abstract class GStructureViewer extends JInternalFrame implements colourButtons.add(strandColour); colourButtons.add(turnColour); colourButtons.add(buriedColour); + colourButtons.add(purinePyrimidineColour); colourButtons.add(userColour); colourButtons.add(viewerColour); 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)