From c0c5cf49bdc063815641e28d51aa0e77873f80fe Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 4 Aug 2008 11:08:03 +0000 Subject: [PATCH] added 'showbutton' applet parameter --- src/jalview/bin/JalviewLite.java | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index c7cc4f3..86aacf1 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -352,26 +352,35 @@ public class JalviewLite if (getParameter("embedded") != null && getParameter("embedded").equalsIgnoreCase("true")) { + // Launch as embedded applet in page embedded = true; LoadingThread loader = new LoadingThread(file, applet); loader.start(); } else if (file != null) { - add(launcher); - - launcher.addActionListener(new java.awt.event.ActionListener() + if (getParameter("showbutton")!=null && !getParameter("showbutton").equalsIgnoreCase("false")) { - public void actionPerformed(ActionEvent e) + // Add the JalviewLite 'Button' to the page + add(launcher); + launcher.addActionListener(new java.awt.event.ActionListener() { - LoadingThread loader = new LoadingThread(file, + public void actionPerformed(ActionEvent e) + { + LoadingThread loader = new LoadingThread(file, applet); + loader.start(); + } + }); + } else { + // Open jalviewLite immediately. + LoadingThread loader = new LoadingThread(file, applet); loader.start(); } - }); } else { + // jalview initialisation with no alignment. loadAlignment() method can still be called to open new alignments. file = "NO FILE"; fileFound = false; } -- 1.7.10.2