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
viewport setting for displaying sequence logos
[jalview.git]
/
src
/
jalview
/
bin
/
JalviewLite.java
diff --git
a/src/jalview/bin/JalviewLite.java
b/src/jalview/bin/JalviewLite.java
index
9a09df4
..
7329a6f
100755
(executable)
--- a/
src/jalview/bin/JalviewLite.java
+++ b/
src/jalview/bin/JalviewLite.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@
-258,6
+258,7
@@
public class JalviewLite extends Applet
public AlignFrame loadAlignment(String text, String title)
{
Alignment al = null;
public AlignFrame loadAlignment(String text, String title)
{
Alignment al = null;
+
String format = new IdentifyFile().Identify(text,
AppletFormatAdapter.PASTE);
try
String format = new IdentifyFile().Identify(text,
AppletFormatAdapter.PASTE);
try
@@
-656,6
+657,7
@@
public class JalviewLite extends Applet
private void startLoading()
{
private void startLoading()
{
+ AlignFrame newAlignFrame;
dbgMsg("Loading thread started with:\n>>file\n" + _file + ">>endfile");
file = setProtocolState(_file);
dbgMsg("Loading thread started with:\n>>file\n" + _file + ">>endfile");
file = setProtocolState(_file);
@@
-674,16
+676,20
@@
public class JalviewLite extends Applet
if ((al != null) && (al.getHeight() > 0))
{
dbgMsg("Successfully loaded file.");
if ((al != null) && (al.getHeight() > 0))
{
dbgMsg("Successfully loaded file.");
- initialAlignFrame = new AlignFrame(al, applet, file, embedded);
+ newAlignFrame = new AlignFrame(al, applet, file, embedded);
+ if (initialAlignFrame==null)
+ {
+ initialAlignFrame = newAlignFrame;
+ }
// update the focus.
// update the focus.
- currentAlignFrame = initialAlignFrame;
+ currentAlignFrame = newAlignFrame;
if (protocol == jalview.io.AppletFormatAdapter.PASTE)
{
if (protocol == jalview.io.AppletFormatAdapter.PASTE)
{
- currentAlignFrame.setTitle("Sequences from " + getDocumentBase());
+ newAlignFrame.setTitle("Sequences from " + getDocumentBase());
}
}
- currentAlignFrame.statusBar.setText("Successfully loaded file "
+ newAlignFrame.statusBar.setText("Successfully loaded file "
+ file);
String treeFile = applet.getParameter("tree");
+ file);
String treeFile = applet.getParameter("tree");
@@
-709,7
+715,7
@@
public class JalviewLite extends Applet
if (fin.getTree() != null)
{
if (fin.getTree() != null)
{
- currentAlignFrame.loadTree(fin, treeFile);
+ newAlignFrame.loadTree(fin, treeFile);
dbgMsg("Successfuly imported tree.");
}
else
dbgMsg("Successfuly imported tree.");
}
else
@@
-727,14
+733,14
@@
public class JalviewLite extends Applet
{
param = setProtocolState(param);
{
param = setProtocolState(param);
- currentAlignFrame.parseFeaturesFile(param, protocol);
+ newAlignFrame.parseFeaturesFile(param, protocol);
}
param = getParameter("showFeatureSettings");
if (param != null && param.equalsIgnoreCase("true"))
{
}
param = getParameter("showFeatureSettings");
if (param != null && param.equalsIgnoreCase("true"))
{
- currentAlignFrame.viewport.showSequenceFeatures(true);
- new FeatureSettings(currentAlignFrame.alignPanel);
+ newAlignFrame.viewport.showSequenceFeatures(true);
+ new FeatureSettings(newAlignFrame.alignPanel);
}
param = getParameter("annotations");
}
param = getParameter("annotations");
@@
-743,11
+749,11
@@
public class JalviewLite extends Applet
param = setProtocolState(param);
if (new AnnotationFile().readAnnotationFile(
param = setProtocolState(param);
if (new AnnotationFile().readAnnotationFile(
- currentAlignFrame.viewport.getAlignment(), param,
+ newAlignFrame.viewport.getAlignment(), param,
protocol))
{
protocol))
{
- currentAlignFrame.alignPanel.fontChanged();
- currentAlignFrame.alignPanel.setScrollValues(0, 0);
+ newAlignFrame.alignPanel.fontChanged();
+ newAlignFrame.alignPanel.setScrollValues(0, 0);
}
else
{
}
else
{
@@
-767,7
+773,7
@@
public class JalviewLite extends Applet
jalview.io.JPredFile predictions = new jalview.io.JPredFile(
param, protocol);
JnetAnnotationMaker.add_annotation(predictions,
jalview.io.JPredFile predictions = new jalview.io.JPredFile(
param, protocol);
JnetAnnotationMaker.add_annotation(predictions,
- currentAlignFrame.viewport.getAlignment(), 0, false); // false==do
+ newAlignFrame.viewport.getAlignment(), 0, false); // false==do
// not
// add
// sequence
// not
// add
// sequence
@@
-775,8
+781,8
@@
public class JalviewLite extends Applet
// from
// concise
// output
// from
// concise
// output
- currentAlignFrame.alignPanel.fontChanged();
- currentAlignFrame.alignPanel.setScrollValues(0, 0);
+ newAlignFrame.alignPanel.fontChanged();
+ newAlignFrame.alignPanel.setScrollValues(0, 0);
} catch (Exception ex)
{
ex.printStackTrace();
} catch (Exception ex)
{
ex.printStackTrace();
@@
-815,7
+821,7
@@
public class JalviewLite extends Applet
String sequence = applet.getParameter("PDBSEQ");
if (sequence != null)
seqs = new SequenceI[]
String sequence = applet.getParameter("PDBSEQ");
if (sequence != null)
seqs = new SequenceI[]
- { (Sequence) currentAlignFrame.getAlignViewport()
+ { (Sequence) newAlignFrame.getAlignViewport()
.getAlignment().findName(sequence) };
}
.getAlignment().findName(sequence) };
}
@@
-835,7
+841,7
@@
public class JalviewLite extends Applet
tmp2.addElement(st2.nextToken());
seqstring = st2.nextToken();
}
tmp2.addElement(st2.nextToken());
seqstring = st2.nextToken();
}
- tmp.addElement((Sequence) currentAlignFrame
+ tmp.addElement((Sequence) newAlignFrame
.getAlignViewport().getAlignment().findName(
seqstring));
}
.getAlignViewport().getAlignment().findName(
seqstring));
}
@@
-889,13
+895,13
@@
public class JalviewLite extends Applet
if (jmolAvailable)
{
new jalview.appletgui.AppletJmol(pdb, seqs, chains,
if (jmolAvailable)
{
new jalview.appletgui.AppletJmol(pdb, seqs, chains,
- currentAlignFrame.alignPanel, protocol);
+ newAlignFrame.alignPanel, protocol);
lastFrameX += 40;
lastFrameY += 40;
}
else
new MCview.AppletPDBViewer(pdb, seqs, chains,
lastFrameX += 40;
lastFrameY += 40;
}
else
new MCview.AppletPDBViewer(pdb, seqs, chains,
- currentAlignFrame.alignPanel, protocol);
+ newAlignFrame.alignPanel, protocol);
}
}
}
}
@@
-909,13
+915,13
@@
public class JalviewLite extends Applet
param = getParameter("hidefeaturegroups");
if (param != null)
{
param = getParameter("hidefeaturegroups");
if (param != null)
{
- applet.setFeatureGroupState(param, false);
+ applet.setFeatureGroupStateOn(newAlignFrame,param, false);
}
// show specific groups
param = getParameter("showfeaturegroups");
if (param != null)
{
}
// show specific groups
param = getParameter("showfeaturegroups");
if (param != null)
{
- applet.setFeatureGroupState(param, true);
+ applet.setFeatureGroupStateOn(newAlignFrame,param, true);
}
}
else
}
}
else