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;
}