import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.api.SplitContainerI;
import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.gui.JvSwingUtils;
import jalview.gui.Preferences;
import jalview.io.FileFormats;
protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
- protected JTabbedPane tabbedPane = jalview.jbgui.swing.JTabbedPane.createTabbedPane();
+ protected JTabbedPane tabbedPane = jalview.jbgui.GDesktop.createTabbedPane();
protected JMenuItem reload = new JMenuItem();
alignFrameMenuBar.add(formatMenu);
alignFrameMenuBar.add(colourMenu);
alignFrameMenuBar.add(calculateMenu);
- alignFrameMenuBar.add(webService);
+ if (!Jalview.isJS())
+ {
+ alignFrameMenuBar.add(webService);
+ }
fileMenu.add(fetchSequence);
fileMenu.add(addSequenceMenu);
fileMenu.add(exportAnnotations);
fileMenu.add(loadTreeMenuItem);
fileMenu.add(associatedData);
- /*
- * No VCF import in Jalview-JS
- * @j2sNative
- */
+ if (!Jalview.isJS())
{
fileMenu.add(loadVcf);
}
hideMenu.add(hideAllSelection);
hideMenu.add(hideAllButSelection);
viewMenu.add(newView);
- viewMenu.add(expandViews);
- viewMenu.add(gatherViews);
+ if (!Jalview.isJS())
+ {
+ viewMenu.add(expandViews);
+ viewMenu.add(gatherViews);
+ }
viewMenu.addSeparator();
viewMenu.add(showMenu);
viewMenu.add(hideMenu);
calculateMenu.addSeparator();
calculateMenu.add(expandAlignment);
calculateMenu.add(extractScores);
- calculateMenu.addSeparator();
- calculateMenu.add(runGroovy);
+ if (!Jalview.isJS())
+ {
+ calculateMenu.addSeparator();
+ calculateMenu.add(runGroovy);
+ }
webServiceNoServices = new JMenuItem(
MessageManager.getString("label.no_services"));
webService.add(webServiceNoServices);
- exportImageMenu.add(htmlMenuItem);
+ if (!Jalview.isJS())
+ {
+ exportImageMenu.add(htmlMenuItem);
+ }
exportImageMenu.add(epsFile);
exportImageMenu.add(createPNG);
exportImageMenu.add(createBioJS);
- exportImageMenu.add(createSVG);
+ if (!Jalview.isJS())
+ {
+ exportImageMenu.add(createSVG);
+ }
addSequenceMenu.add(addFromFile);
addSequenceMenu.add(addFromText);
addSequenceMenu.add(addFromURL);
package jalview.jbgui;
import jalview.api.AlignmentViewPanel;
+import jalview.bin.Jalview;
import jalview.io.FileFormatException;
import jalview.util.MessageManager;
import jalview.util.Platform;
*/
public class GDesktop extends JFrame
{
+
+ public static javax.swing.JTabbedPane createTabbedPane()
+ {
+ // now just always return JTabbedPane
+ return new javax.swing.JTabbedPane();
+// // BH 2018 coercing jalview.jbgui.swing.JTabbedPane() for now
+// if (/** @j2sNative false && */
+// true)
+// {
+// // Java
+// return new javax.swing.JTabbedPane();
+// }
+// // JavaScript
+// return (javax.swing.JTabbedPane) (Object) new jalview.jbgui.swing.JTabbedPane();
+ }
+
+
protected static JMenu windowMenu = new JMenu();
JMenuBar desktopMenubar = new JMenuBar();
@Override
public void actionPerformed(ActionEvent e)
{
- documentationMenuItem_actionPerformed(e);
+ documentationMenuItem_actionPerformed();
}
});
this.getContentPane().setLayout(flowLayout1);
@Override
public void actionPerformed(ActionEvent e)
{
- saveState_actionPerformed(e);
+ saveState_actionPerformed();
}
});
loadState.setText(MessageManager.getString("action.load_project"));
@Override
public void actionPerformed(ActionEvent e)
{
- loadState_actionPerformed(e);
+ loadState_actionPerformed();
}
});
inputMenu.setText(MessageManager.getString("label.input_alignment"));
desktopMenubar.add(windowMenu);
FileMenu.add(inputMenu);
FileMenu.add(inputSequence);
- FileMenu.addSeparator();
- FileMenu.add(saveState);
- FileMenu.add(loadState);
+ if (!Jalview.isJS())
+ {
+ FileMenu.addSeparator();
+ FileMenu.add(saveState);
+ FileMenu.add(loadState);
+ }
FileMenu.addSeparator();
FileMenu.add(quit);
HelpMenu.add(aboutMenuItem);
VamsasMenu.add(vamsasSave);
VamsasMenu.add(vamsasStop);
toolsMenu.add(preferences);
- toolsMenu.add(showMemusage);
- toolsMenu.add(showConsole);
- toolsMenu.add(showNews);
- toolsMenu.add(garbageCollect);
- toolsMenu.add(groovyShell);
+ if (!Jalview.isJS())
+ {
+ toolsMenu.add(showMemusage);
+ toolsMenu.add(showConsole);
+ }
+ if (!Jalview.isJS())
+ {
+ toolsMenu.add(showNews);
+ toolsMenu.add(garbageCollect);
+ toolsMenu.add(groovyShell);
+ }
toolsMenu.add(experimentalFeatures);
// toolsMenu.add(snapShotWindow);
inputMenu.add(inputLocalFileMenuItem);
{
}
- /**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
- */
- protected void documentationMenuItem_actionPerformed(ActionEvent e)
+ protected void documentationMenuItem_actionPerformed()
{
}
{
}
- /**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
- */
- public void saveState_actionPerformed(ActionEvent e)
- {
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
- */
- public void loadState_actionPerformed(ActionEvent e)
+ public void saveState_actionPerformed()
{
}
- /**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
- */
- public void loadJalviewAlign_actionPerformed(ActionEvent e)
+ public void loadState_actionPerformed()
{
}