label.invalid_name = Invalid Name !
label.output_seq_details = Output Sequence Details to list all database references
label.urllinks = Links
+label.show_experimental = Enable experimental features
+label.show_experimental_tip = Enable any new and currently 'experimental' features (see Latest Release Notes for details)
\ No newline at end of file
savemenu.setVisible(false); // not yet implemented
viewMenu.add(fitToWindow);
- JMenuItem writeFeatures = new JMenuItem(
- MessageManager.getString("label.create_chimera_attributes"));
- writeFeatures.setToolTipText(MessageManager
- .getString("label.create_chimera_attributes_tip"));
- writeFeatures.addActionListener(new ActionListener()
+ /*
+ * exchange of Jalview features and Chimera attributes is for now
+ * an optionally enabled experimental feature
+ */
+ if (Desktop.instance.showExperimental())
{
- @Override
- public void actionPerformed(ActionEvent e)
+ JMenuItem writeFeatures = new JMenuItem(
+ MessageManager.getString("label.create_chimera_attributes"));
+ writeFeatures.setToolTipText(MessageManager
+ .getString("label.create_chimera_attributes_tip"));
+ writeFeatures.addActionListener(new ActionListener()
{
- sendFeaturesToChimera();
- }
- });
- viewerActionMenu.add(writeFeatures);
-
- final JMenu fetchAttributes = new JMenu(
- MessageManager.getString("label.fetch_chimera_attributes"));
- fetchAttributes.setToolTipText(MessageManager
- .getString("label.fetch_chimera_attributes_tip"));
- fetchAttributes.addMouseListener(new MouseAdapter()
- {
-
- @Override
- public void mouseEntered(MouseEvent e)
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ sendFeaturesToChimera();
+ }
+ });
+ viewerActionMenu.add(writeFeatures);
+
+ final JMenu fetchAttributes = new JMenu(
+ MessageManager.getString("label.fetch_chimera_attributes"));
+ fetchAttributes.setToolTipText(MessageManager
+ .getString("label.fetch_chimera_attributes_tip"));
+ fetchAttributes.addMouseListener(new MouseAdapter()
{
- buildAttributesMenu(fetchAttributes);
- }
- });
- viewerActionMenu.add(fetchAttributes);
+ @Override
+ public void mouseEntered(MouseEvent e)
+ {
+ buildAttributesMenu(fetchAttributes);
+ }
+ });
+ viewerActionMenu.add(fetchAttributes);
+ }
}
/**
DropTargetListener, ClipboardOwner, IProgressIndicator,
jalview.api.StructureSelectionManagerProvider
{
+ private static final String EXPERIMENTAL_FEATURES = "EXPERIMENTAL_FEATURES";
private JalviewChangeSupport changeSupport = new JalviewChangeSupport();
instance = this;
doVamsasClientCheck();
- groovyShell = new JMenuItem();
- groovyShell.setText(MessageManager.getString("label.groovy_console"));
- groovyShell.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- groovyShell_actionPerformed();
- }
- });
- toolsMenu.add(groovyShell);
- groovyShell.setVisible(true);
-
doConfigureStructurePrefs();
setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION"));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
showConsole(showjconsole);
showNews.setVisible(false);
+
+ experimentalFeatures.setSelected(showExperimental());
getIdentifiersOrgData();
});
}
+ /**
+ * Answers true if user preferences to enable experimental features is True
+ * (on), else false
+ *
+ * @return
+ */
+ public boolean showExperimental()
+ {
+ String experimental = Cache.getDefault(EXPERIMENTAL_FEATURES,
+ Boolean.FALSE.toString());
+ return Boolean.valueOf(experimental).booleanValue();
+ }
+
public void doConfigureStructurePrefs()
{
// configure services
}
- protected JMenuItem groovyShell;
-
/**
* Accessor method to quickly get all the AlignmentFrames loaded.
*
/**
* Add Groovy Support to Jalview
*/
+ @Override
public void groovyShell_actionPerformed()
{
try
}
}
}
+
+ /**
+ * Sets the Preferences property for experimental features to True or False
+ * depending on the state of the controlling menu item
+ */
+ @Override
+ protected void showExperimental_actionPerformed(boolean selected)
+ {
+ Cache.setProperty(EXPERIMENTAL_FEATURES, Boolean.toString(selected));
+ }
}
import jalview.api.AlignmentViewPanel;
import jalview.io.FileFormatException;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import java.awt.FlowLayout;
import java.awt.Toolkit;
JMenuItem garbageCollect = new JMenuItem();
+ protected JMenuItem groovyShell;
+
+ protected JCheckBoxMenuItem experimentalFeatures;
+
protected JCheckBoxMenuItem showConsole = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem showNews = new JCheckBoxMenuItem();
e.printStackTrace();
}
- if (!new jalview.util.Platform().isAMac())
+ if (!Platform.isAMac())
{
FileMenu.setMnemonic('F');
inputLocalFileMenuItem.setMnemonic('L');
showNews_actionPerformed(e);
}
});
+ groovyShell = new JMenuItem();
+ groovyShell.setText(MessageManager.getString("label.groovy_console"));
+ groovyShell.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ groovyShell_actionPerformed();
+ }
+ });
+ experimentalFeatures = new JCheckBoxMenuItem();
+ experimentalFeatures.setText(MessageManager
+ .getString("label.show_experimental"));
+ experimentalFeatures.setToolTipText(MessageManager
+ .getString("label.show_experimental_tip"));
+ experimentalFeatures.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ showExperimental_actionPerformed(experimentalFeatures.isSelected());
+ }
+ });
+
snapShotWindow.setText(MessageManager.getString("label.take_snapshot"));
snapShotWindow.addActionListener(new ActionListener()
{
toolsMenu.add(showConsole);
toolsMenu.add(showNews);
toolsMenu.add(garbageCollect);
+ toolsMenu.add(groovyShell);
+ toolsMenu.add(experimentalFeatures);
// toolsMenu.add(snapShotWindow);
inputMenu.add(inputLocalFileMenuItem);
inputMenu.add(inputURLMenuItem);
// inputMenu.add(vamsasLoad);
}
+ protected void showExperimental_actionPerformed(boolean selected)
+ {
+ }
+
+ protected void groovyShell_actionPerformed()
+ {
+ }
+
protected void snapShotWindow_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub