From: gmungoc Date: Fri, 17 Aug 2018 13:57:49 +0000 (+0100) Subject: JAL-3048 remove obsolete way of handling dialogs in JalviewJS X-Git-Tag: Release_2_11_4_0~45^2~18^2~484^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5986040b8a7172172b8650e6a4c717af5bca277b;p=jalview.git JAL-3048 remove obsolete way of handling dialogs in JalviewJS --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 5b9df68..a59cc13 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -157,8 +157,7 @@ import javax.swing.SwingUtilities; * @version $Revision$ */ public class AlignFrame extends GAlignFrame implements DropTargetListener, - IProgressIndicator, AlignViewControllerGuiI, ColourChangeListener, - PropertyChangeListener + IProgressIndicator, AlignViewControllerGuiI, ColourChangeListener { public static final int DEFAULT_WIDTH = 700; @@ -334,34 +333,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, init(); } - @Override - public void propertyChange(PropertyChangeEvent evt) - { - Desktop.getDesktop().propertyChange(evt); - } - - /** - * BH 2018 - * - * @return true if we have any features - */ - @Override - protected boolean haveAlignmentFeatures() - { - AlignmentI alignment = getViewport().getAlignment(); - - for (int i = 0; i < alignment.getHeight(); i++) - { - SequenceI seq = alignment.getSequenceAt(i); - for (String group : seq.getFeatures().getFeatureGroups(true)) - { - if (group != null) - return true; - } - } - return false; - } - /** * initalise the alignframe from the underlying viewport data and the * configurations diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 3a6e603..69031d1 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -285,16 +285,7 @@ public class GAlignFrame extends JInternalFrame addMenuActionAndAccelerator(keyStroke, closeMenuItem, al); JMenu editMenu = new JMenu(MessageManager.getString("action.edit")); - JMenu viewMenu = new JMenu(MessageManager.getString("action.view")) { - - public void setPopupMenuVisible(boolean b) { - if (b) { - openFeatureSettings.setEnabled(haveAlignmentFeatures()); - } - super.setPopupMenuVisible(b); - } - - }; + JMenu viewMenu = new JMenu(MessageManager.getString("action.view")); JMenu annotationsMenu = new JMenu( MessageManager.getString("action.annotations")); JMenu showMenu = new JMenu(MessageManager.getString("action.show")); @@ -1899,12 +1890,6 @@ public class GAlignFrame extends JInternalFrame // selectMenu.add(listenToViewSelections); } - protected boolean haveAlignmentFeatures() - { - // because gAlignFrame is not an abstract class -- see AlignFrame - return false; - } - protected void loadVcf_actionPerformed() { }