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
JAL-3081 restore annotation ordering from project (work in progress)
[jalview.git]
/
src
/
jalview
/
gui
/
AppJmol.java
diff --git
a/src/jalview/gui/AppJmol.java
b/src/jalview/gui/AppJmol.java
index
29f02d6
..
6c934c8
100644
(file)
--- a/
src/jalview/gui/AppJmol.java
+++ b/
src/jalview/gui/AppJmol.java
@@
-57,7
+57,7
@@
public class AppJmol extends StructureViewerBase
private static final String SPACE = " ";
private static final String SPACE = " ";
- private static final String BACKSLASH = "\"";
+ private static final String QUOTE = "\"";
AppJmolBinding jmb;
AppJmolBinding jmb;
@@
-175,10
+175,13
@@
public class AppJmol extends StructureViewerBase
{
progressBar = ap.alignFrame;
{
progressBar = ap.alignFrame;
- openNewJmol(ap, new PDBEntry[] { pdbentry }, new SequenceI[][] { seq });
+ openNewJmol(ap, alignAddedStructures, new PDBEntry[] { pdbentry },
+ new SequenceI[][]
+ { seq });
}
}
- private void openNewJmol(AlignmentPanel ap, PDBEntry[] pdbentrys,
+ private void openNewJmol(AlignmentPanel ap, boolean alignAdded,
+ PDBEntry[] pdbentrys,
SequenceI[][] seqs)
{
progressBar = ap.alignFrame;
SequenceI[][] seqs)
{
progressBar = ap.alignFrame;
@@
-187,8
+190,8
@@
public class AppJmol extends StructureViewerBase
addAlignmentPanel(ap);
useAlignmentPanelForColourbyseq(ap);
addAlignmentPanel(ap);
useAlignmentPanelForColourbyseq(ap);
- alignAddedStructures = true;
- useAlignmentPanelForSuperposition(ap);
+ alignAddedStructures = alignAdded;
+ useAlignmentPanelForSuperposition(ap);
jmb.setColourBySequence(true);
setSize(400, 400); // probably should be a configurable/dynamic default here
jmb.setColourBySequence(true);
setSize(400, 400); // probably should be a configurable/dynamic default here
@@
-210,16
+213,19
@@
public class AppJmol extends StructureViewerBase
}
/**
}
/**
- * create a new Jmol containing several structures superimposed using the
- * given alignPanel.
+ * create a new Jmol containing several structures optionally superimposed
+ * using the given alignPanel.
*
* @param ap
*
* @param ap
+ * @param alignAdded
+ * - true to superimpose
* @param pe
* @param seqs
*/
* @param pe
* @param seqs
*/
- public AppJmol(AlignmentPanel ap, PDBEntry[] pe, SequenceI[][] seqs)
+ public AppJmol(AlignmentPanel ap, boolean alignAdded, PDBEntry[] pe,
+ SequenceI[][] seqs)
{
{
- openNewJmol(ap, pe, seqs);
+ openNewJmol(ap, alignAdded, pe, seqs);
}
}
@@
-253,8
+259,6
@@
public class AppJmol extends StructureViewerBase
jmb.setFinishedInit(true);
}
jmb.setFinishedInit(true);
}
- boolean allChainsSelected = false;
-
@Override
void showSelectedChains()
{
@Override
void showSelectedChains()
{
@@
-321,8
+325,8
@@
public class AppJmol extends StructureViewerBase
StringBuilder fileList = new StringBuilder();
for (String s : files)
{
StringBuilder fileList = new StringBuilder();
for (String s : files)
{
- fileList.append(SPACE).append(BACKSLASH)
- .append(Platform.escapeString(s)).append(BACKSLASH);
+ fileList.append(SPACE).append(QUOTE)
+ .append(Platform.escapeString(s)).append(QUOTE);
}
String filesString = fileList.toString();
}
String filesString = fileList.toString();
@@
-397,7
+401,7
@@
public class AppJmol extends StructureViewerBase
jmb.updateColours(ap);
}
// do superposition if asked to
jmb.updateColours(ap);
}
// do superposition if asked to
- if (Cache.getDefault("AUTOSUPERIMPOSE", true) && alignAddedStructures)
+ if (alignAddedStructures)
{
alignAddedStructures();
}
{
alignAddedStructures();
}
@@
-431,7
+435,7
@@
public class AppJmol extends StructureViewerBase
}
}
});
}
}
});
- alignAddedStructures = false;
+
}
/**
}
/**
@@
-460,6
+464,7
@@
public class AppJmol extends StructureViewerBase
String file = jmb.getPdbEntry(pi).getFile();
if (file == null)
{
String file = jmb.getPdbEntry(pi).getFile();
if (file == null)
{
+ // todo: extract block as method and pull up (also ChimeraViewFrame)
// retrieve the pdb and store it locally
AlignmentI pdbseq = null;
pdbid = jmb.getPdbEntry(pi).getId();
// retrieve the pdb and store it locally
AlignmentI pdbseq = null;
pdbid = jmb.getPdbEntry(pi).getId();