X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGStructureViewer.java;h=bd0f1de5f098c57b85a76a0dbbade4192c85d176;hb=7fadc8dc33be5781fac68507b08a9e387ddb5761;hp=24e7ee3d7a9ae7ad842ac8ff0b49d2d04b8e12e5;hpb=c4ec878c9cb59fc40a88ed8ecdf5fda46f3de111;p=jalview.git diff --git a/src/jalview/jbgui/GStructureViewer.java b/src/jalview/jbgui/GStructureViewer.java index 24e7ee3..bd0f1de 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.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ 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 */ @@ -105,6 +114,7 @@ public abstract class GStructureViewer extends JInternalFrame implements pdbFile.setText(MessageManager.getString("label.pdb_file")); pdbFile.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { pdbFile_actionPerformed(actionEvent); @@ -115,6 +125,7 @@ public abstract class GStructureViewer extends JInternalFrame implements png.setText("PNG"); png.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { png_actionPerformed(actionEvent); @@ -125,6 +136,7 @@ public abstract class GStructureViewer extends JInternalFrame implements eps.setText("EPS"); eps.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { eps_actionPerformed(actionEvent); @@ -135,22 +147,35 @@ public abstract class GStructureViewer extends JInternalFrame implements viewMapping.setText(MessageManager.getString("label.view_mapping")); viewMapping.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { viewMapping_actionPerformed(actionEvent); } }); 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() + { + @Override + 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() { + @Override public void actionPerformed(ActionEvent actionEvent) { backGround_actionPerformed(actionEvent); @@ -160,6 +185,7 @@ public abstract class GStructureViewer extends JInternalFrame implements seqColour.setText(MessageManager.getString("action.by_sequence")); seqColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { seqColour_actionPerformed(actionEvent); @@ -168,6 +194,7 @@ public abstract class GStructureViewer extends JInternalFrame implements chainColour.setText(MessageManager.getString("action.by_chain")); chainColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { chainColour_actionPerformed(actionEvent); @@ -176,6 +203,7 @@ public abstract class GStructureViewer extends JInternalFrame implements chargeColour.setText(MessageManager.getString("label.charge_cysteine")); chargeColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { chargeColour_actionPerformed(actionEvent); @@ -184,6 +212,7 @@ public abstract class GStructureViewer extends JInternalFrame implements zappoColour.setText(MessageManager.getString("label.zappo")); zappoColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { zappoColour_actionPerformed(actionEvent); @@ -192,6 +221,7 @@ public abstract class GStructureViewer extends JInternalFrame implements taylorColour.setText(MessageManager.getString("label.taylor")); taylorColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { taylorColour_actionPerformed(actionEvent); @@ -200,6 +230,7 @@ public abstract class GStructureViewer extends JInternalFrame implements hydroColour.setText(MessageManager.getString("label.hydrophobicity")); hydroColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { hydroColour_actionPerformed(actionEvent); @@ -209,6 +240,7 @@ public abstract class GStructureViewer extends JInternalFrame implements .getString("label.strand_propensity")); strandColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { strandColour_actionPerformed(actionEvent); @@ -217,6 +249,7 @@ public abstract class GStructureViewer extends JInternalFrame implements helixColour.setText(MessageManager.getString("label.helix_propensity")); helixColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { helixColour_actionPerformed(actionEvent); @@ -225,6 +258,7 @@ public abstract class GStructureViewer extends JInternalFrame implements turnColour.setText(MessageManager.getString("label.turn_propensity")); turnColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { turnColour_actionPerformed(actionEvent); @@ -233,6 +267,7 @@ public abstract class GStructureViewer extends JInternalFrame implements buriedColour.setText(MessageManager.getString("label.buried_index")); buriedColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { buriedColour_actionPerformed(actionEvent); @@ -242,6 +277,7 @@ public abstract class GStructureViewer extends JInternalFrame implements .getString("label.purine_pyrimidine")); purinePyrimidineColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { purinePyrimidineColour_actionPerformed(actionEvent); @@ -251,6 +287,7 @@ public abstract class GStructureViewer extends JInternalFrame implements userColour.setText(MessageManager.getString("action.user_defined")); userColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { userColour_actionPerformed(actionEvent); @@ -263,6 +300,7 @@ public abstract class GStructureViewer extends JInternalFrame implements .getString("label.let_jmol_manage_structure_colours")); viewerColour.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { viewerColour_actionPerformed(actionEvent); @@ -274,6 +312,7 @@ public abstract class GStructureViewer extends JInternalFrame implements helpItem.setText(MessageManager.getString("label.jmol_help")); helpItem.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { showHelp_actionPerformed(actionEvent); @@ -283,6 +322,7 @@ public abstract class GStructureViewer extends JInternalFrame implements .setText(MessageManager.getString("label.align_structures")); alignStructs.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent actionEvent) { alignStructs_actionPerformed(actionEvent); @@ -329,11 +369,24 @@ 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 highlightSelection_actionPerformed() + { } protected void viewerColour_actionPerformed(ActionEvent actionEvent)