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-2089 patch broken merge to master for Release 2.10.0b1
[jalview.git]
/
src
/
jalview
/
ext
/
rbvi
/
chimera
/
JalviewChimeraBinding.java
diff --git
a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
index
af87e44
..
7ba9186
100644
(file)
--- a/
src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
+++ b/
src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
@@
-101,17
+101,8
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
private String lastCommand;
private String lastCommand;
- private boolean loadedInline;
-
- /**
- * current set of model filenames loaded
- */
- String[] modelFileNames = null;
-
String lastHighlightCommand;
String lastHighlightCommand;
- private List<String> lastReply;
-
/*
* incremented every time a load notification is successfully handled -
* lightweight mechanism for other threads to detect when they can start
/*
* incremented every time a load notification is successfully handled -
* lightweight mechanism for other threads to detect when they can start
@@
-617,7
+608,8
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
if (lastCommand == null || !lastCommand.equals(command))
{
// trim command or it may never find a match in the replyLog!!
if (lastCommand == null || !lastCommand.equals(command))
{
// trim command or it may never find a match in the replyLog!!
- lastReply = viewer.sendChimeraCommand(command.trim(), logResponse);
+ List<String> lastReply = viewer.sendChimeraCommand(command.trim(),
+ logResponse);
if (logResponse && debug)
{
log("Response from command ('" + command + "') was:\n" + lastReply);
if (logResponse && debug)
{
log("Response from command ('" + command + "') was:\n" + lastReply);
@@
-715,17
+707,6
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
// End StructureListener
// //////////////////////////
// End StructureListener
// //////////////////////////
- public Color getColour(int atomIndex, int pdbResNum, String chain,
- String pdbfile)
- {
- if (getModelNum(pdbfile) < 0)
- {
- return null;
- }
- log("get model / residue colour attribute unimplemented");
- return null;
- }
-
/**
* returns the current featureRenderer that should be used to colour the
* structures
/**
* returns the current featureRenderer that should be used to colour the
* structures
@@
-795,15
+776,6
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
}
/**
}
/**
- * map from string to applet
- */
- public Map getRegistryInfo()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
* returns the current sequenceRenderer that should be used to colour the
* structures
*
* returns the current sequenceRenderer that should be used to colour the
* structures
*
@@
-815,20
+787,18
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
AlignmentViewPanel alignment);
/**
AlignmentViewPanel alignment);
/**
- * Construct and send a command to highlight zero, one or more atoms.
- *
- * <pre>
- * Done by generating a command like (to 'highlight' positions 44 and 46)
- * show #0:44,46.C
- * </pre>
+ * Construct and send a command to highlight zero, one or more atoms. We do
+ * this by sending an "rlabel" command to show the residue label at that
+ * position.
*/
@Override
public void highlightAtoms(List<AtomSpec> atoms)
{
*/
@Override
public void highlightAtoms(List<AtomSpec> atoms)
{
- if (atoms == null)
+ if (atoms == null || atoms.size() == 0)
{
return;
}
{
return;
}
+
StringBuilder cmd = new StringBuilder(128);
boolean first = true;
boolean found = false;
StringBuilder cmd = new StringBuilder(128);
boolean first = true;
boolean found = false;
@@
-843,7
+813,7
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
{
if (first)
{
{
if (first)
{
- cmd.append("show #").append(cms.get(0).getModelNumber())
+ cmd.append("rlabel #").append(cms.get(0).getModelNumber())
.append(":");
}
else
.append(":");
}
else
@@
-851,7
+821,6
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
cmd.append(",");
}
first = false;
cmd.append(",");
}
first = false;
- cmd.append(cms.get(0).getModelNumber()).append(":");
cmd.append(pdbResNum);
if (!chain.equals(" "))
{
cmd.append(pdbResNum);
if (!chain.equals(" "))
{
@@
-863,19
+832,24
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
String command = cmd.toString();
/*
String command = cmd.toString();
/*
- * Avoid repeated commands for the same residue
+ * avoid repeated commands for the same residue
*/
if (command.equals(lastHighlightCommand))
{
return;
}
*/
if (command.equals(lastHighlightCommand))
{
return;
}
- viewerCommandHistory(false);
+ /*
+ * unshow the label for the previous residue
+ */
+ if (lastHighlightCommand != null)
+ {
+ viewer.sendChimeraCommand("~" + lastHighlightCommand, false);
+ }
if (found)
{
if (found)
{
- viewer.sendChimeraCommand(command.toString(), false);
+ viewer.sendChimeraCommand(command, false);
}
}
- viewerCommandHistory(true);
this.lastHighlightCommand = command;
}
this.lastHighlightCommand = command;
}
@@
-1127,6
+1101,8
@@
public abstract class JalviewChimeraBinding extends AAStructureBindingModel
/**
* Send a 'show' command for all atoms in the currently selected columns
*
/**
* Send a 'show' command for all atoms in the currently selected columns
*
+ * TODO: pull up to abstract structure viewer interface
+ *
* @param vp
*/
public void highlightSelection(AlignmentViewPanel vp)
* @param vp
*/
public void highlightSelection(AlignmentViewPanel vp)