X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FChimeraViewFrame.java;h=8dd0174762e1196173289816595832a89558e357;hb=36f083dc674297be2157d9f291a7cddba9d3250a;hp=810f40d7538d5111c0a836e21b1fc119303689f9;hpb=c9de7d22f36c8866959c8c3ddbad72c2fa841f32;p=jalview.git diff --git a/src/jalview/gui/ChimeraViewFrame.java b/src/jalview/gui/ChimeraViewFrame.java index 810f40d..8dd0174 100644 --- a/src/jalview/gui/ChimeraViewFrame.java +++ b/src/jalview/gui/ChimeraViewFrame.java @@ -73,7 +73,10 @@ public class ChimeraViewFrame extends StructureViewerBase private int myHeight = 150; - /** + private JMenuItem writeFeatures=null; + + private JMenu fetchAttributes=null; +/** * Initialise menu options. */ @Override @@ -84,7 +87,7 @@ public class ChimeraViewFrame extends StructureViewerBase savemenu.setVisible(false); // not yet implemented viewMenu.add(fitToWindow); - JMenuItem writeFeatures = new JMenuItem( + writeFeatures = new JMenuItem( MessageManager.getString("label.create_viewer_attributes")); writeFeatures.setToolTipText(MessageManager .getString("label.create_viewer_attributes_tip")); @@ -98,10 +101,10 @@ public class ChimeraViewFrame extends StructureViewerBase }); viewerActionMenu.add(writeFeatures); - final JMenu fetchAttributes = new JMenu( - MessageManager.getString("label.fetch_chimera_attributes")); + fetchAttributes = new JMenu( + MessageManager.formatMessage("label.fetch_viewer_attributes",getViewerName())); fetchAttributes.setToolTipText( - MessageManager.getString("label.fetch_chimera_attributes_tip")); + MessageManager.formatMessage("label.fetch_viewer_attributes_tip",getViewerName())); fetchAttributes.addMouseListener(new MouseAdapter() { @@ -113,7 +116,15 @@ public class ChimeraViewFrame extends StructureViewerBase }); viewerActionMenu.add(fetchAttributes); } - + @Override + protected void buildActionMenu() + { + super.buildActionMenu(); + // add these back in after menu is refreshed + viewerActionMenu.add(writeFeatures); + viewerActionMenu.add(fetchAttributes); + + }; /** * Query the structure viewer for its residue attribute names and add them as * items off the attributes menu @@ -153,7 +164,7 @@ public class ChimeraViewFrame extends StructureViewerBase // todo pull up? int count = jmb.sendFeaturesToViewer(getAlignmentPanel()); statusBar.setText( - MessageManager.formatMessage("label.attributes_set", count)); + MessageManager.formatMessage("label.attributes_set", count, getViewerName())); } /** @@ -491,7 +502,8 @@ public class ChimeraViewFrame extends StructureViewerBase /* * ensure that any newly discovered features (e.g. RESNUM) - * are added to any open feature settings dialog + * are notified to the FeatureRenderer (and added to any + * open feature settings dialog) */ FeatureRenderer fr = getBinding().getFeatureRenderer(null); if (fr != null)