git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3026 Java+JavaScript fix for GD#95
[jalview.git]
/
src
/
jalview
/
jbgui
/
GAlignFrame.java
diff --git
a/src/jalview/jbgui/GAlignFrame.java
b/src/jalview/jbgui/GAlignFrame.java
index
1cf482d
..
7a85a4a
100755
(executable)
--- a/
src/jalview/jbgui/GAlignFrame.java
+++ b/
src/jalview/jbgui/GAlignFrame.java
@@
-196,6
+196,8
@@
public class GAlignFrame extends JInternalFrame
protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
+
+ protected JMenuItem openFeatureSettings;
private SequenceAnnotationOrder annotationSortOrder;
private SequenceAnnotationOrder annotationSortOrder;
@@
-282,7
+284,16
@@
public class GAlignFrame extends JInternalFrame
addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
- JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
+ JMenu viewMenu = new JMenu(MessageManager.getString("action.view")) {
+
+ public void setPopupMenuVisible(boolean b) {
+ if (b) {
+ openFeatureSettings.setEnabled(haveAlignmentFeatures());
+ }
+ super.setPopupMenuVisible(b);
+ }
+
+ };
JMenu annotationsMenu = new JMenu(
MessageManager.getString("action.annotations"));
JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
JMenu annotationsMenu = new JMenu(
MessageManager.getString("action.annotations"));
JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
@@
-1279,8
+1290,9
@@
public class GAlignFrame extends JInternalFrame
}
});
}
});
- JMenuItem openFeatureSettings = new JMenuItem(
+ openFeatureSettings = new JMenuItem(
MessageManager.getString("action.feature_settings"));
MessageManager.getString("action.feature_settings"));
+ openFeatureSettings.setEnabled(false);
openFeatureSettings.addActionListener(new ActionListener()
{
@Override
openFeatureSettings.addActionListener(new ActionListener()
{
@Override
@@
-1722,7
+1734,13
@@
public class GAlignFrame extends JInternalFrame
fileMenu.add(exportAnnotations);
fileMenu.add(loadTreeMenuItem);
fileMenu.add(associatedData);
fileMenu.add(exportAnnotations);
fileMenu.add(loadTreeMenuItem);
fileMenu.add(associatedData);
- fileMenu.add(loadVcf);
+ /*
+ * No VCF import in Jalview-JS
+ * @j2sNative
+ */
+ {
+ fileMenu.add(loadVcf);
+ }
fileMenu.addSeparator();
fileMenu.add(closeMenuItem);
fileMenu.addSeparator();
fileMenu.add(closeMenuItem);
@@
-1868,6
+1886,12
@@
public class GAlignFrame extends JInternalFrame
// selectMenu.add(listenToViewSelections);
}
// selectMenu.add(listenToViewSelections);
}
+ protected boolean haveAlignmentFeatures()
+ {
+ // because gAlignFrame is not an abstract class -- see AlignFrame
+ return false;
+ }
+
protected void loadVcf_actionPerformed()
{
}
protected void loadVcf_actionPerformed()
{
}