X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGStructureViewer.java;h=6c0bedae34587b6529a1e234682725f7d88cd833;hb=4f30214e8098748469c6a4269ac2ed6c5750e4b0;hp=d8f3f611877d68b663879ed6b6939809469b8865;hpb=136c0793b90b72b928c4d77dc109dd5c644e00d3;p=jalview.git diff --git a/src/jalview/jbgui/GStructureViewer.java b/src/jalview/jbgui/GStructureViewer.java index d8f3f61..6c0beda 100644 --- a/src/jalview/jbgui/GStructureViewer.java +++ b/src/jalview/jbgui/GStructureViewer.java @@ -20,10 +20,6 @@ */ package jalview.jbgui; -import jalview.api.structures.JalviewStructureDisplayI; -import jalview.gui.ColourMenuHelper.ColourChangeListener; -import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; @@ -37,8 +33,14 @@ import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JRadioButtonMenuItem; -public abstract class GStructureViewer extends JInternalFrame implements - JalviewStructureDisplayI, ColourChangeListener +import jalview.api.structures.JalviewStructureDisplayI; +import jalview.gui.ColourMenuHelper.ColourChangeListener; +import jalview.util.ImageMaker.TYPE; +import jalview.util.MessageManager; + +@SuppressWarnings("serial") +public abstract class GStructureViewer extends JInternalFrame + implements JalviewStructureDisplayI, ColourChangeListener { // private AAStructureBindingModel bindingModel; @@ -86,6 +88,9 @@ public abstract class GStructureViewer extends JInternalFrame implements private void jbInit() throws Exception { + + setName("jalview-structureviewer"); + JMenuBar menuBar = new JMenuBar(); this.setJMenuBar(menuBar); @@ -93,7 +98,8 @@ public abstract class GStructureViewer extends JInternalFrame implements fileMenu.setText(MessageManager.getString("action.file")); savemenu = new JMenu(); - savemenu.setActionCommand(MessageManager.getString("action.save_image")); + savemenu.setActionCommand( + MessageManager.getString("action.save_image")); savemenu.setText(MessageManager.getString("action.save_as")); JMenuItem pdbFile = new JMenuItem(); @@ -103,7 +109,7 @@ public abstract class GStructureViewer extends JInternalFrame implements @Override public void actionPerformed(ActionEvent actionEvent) { - pdbFile_actionPerformed(actionEvent); + pdbFile_actionPerformed(); } }); @@ -114,7 +120,7 @@ public abstract class GStructureViewer extends JInternalFrame implements @Override public void actionPerformed(ActionEvent actionEvent) { - png_actionPerformed(actionEvent); + makePDBImage(TYPE.PNG); } }); @@ -125,7 +131,7 @@ public abstract class GStructureViewer extends JInternalFrame implements @Override public void actionPerformed(ActionEvent actionEvent) { - eps_actionPerformed(actionEvent); + makePDBImage(TYPE.EPS); } }); @@ -136,7 +142,7 @@ public abstract class GStructureViewer extends JInternalFrame implements @Override public void actionPerformed(ActionEvent actionEvent) { - viewMapping_actionPerformed(actionEvent); + viewMapping_actionPerformed(); } }); @@ -166,18 +172,18 @@ public abstract class GStructureViewer extends JInternalFrame implements @Override public void actionPerformed(ActionEvent actionEvent) { - showHelp_actionPerformed(actionEvent); + showHelp_actionPerformed(); } }); alignStructs = new JMenuItem(); - alignStructs.setText(MessageManager - .getString("label.superpose_structures")); + alignStructs.setText( + MessageManager.getString("label.superpose_structures")); alignStructs.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { - alignStructs_actionPerformed(actionEvent); + alignStructsWithAllAlignPanels(); } }); @@ -215,54 +221,48 @@ public abstract class GStructureViewer extends JInternalFrame implements { } - protected void viewerColour_actionPerformed(ActionEvent actionEvent) + protected void viewerColour_actionPerformed() { } - protected abstract String alignStructs_actionPerformed( - ActionEvent actionEvent); - - public void pdbFile_actionPerformed(ActionEvent actionEvent) - { - - } + protected abstract String alignStructsWithAllAlignPanels(); - public void png_actionPerformed(ActionEvent actionEvent) + public void pdbFile_actionPerformed() { } - public void eps_actionPerformed(ActionEvent actionEvent) + public void makePDBImage(TYPE imageType) { } - public void viewMapping_actionPerformed(ActionEvent actionEvent) + public void viewMapping_actionPerformed() { } - public void seqColour_actionPerformed(ActionEvent actionEvent) + public void seqColour_actionPerformed() { } - public void chainColour_actionPerformed(ActionEvent actionEvent) + public void chainColour_actionPerformed() { } - public void chargeColour_actionPerformed(ActionEvent actionEvent) + public void chargeColour_actionPerformed() { } - public void background_actionPerformed(ActionEvent actionEvent) + public void background_actionPerformed() { } - public void showHelp_actionPerformed(ActionEvent actionEvent) + public void showHelp_actionPerformed() { }