git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c6564f
)
JAL-3390 showSelectedChains pulled up to base class for Jmol/Chimera
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 7 Aug 2019 15:56:17 +0000
(16:56 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 7 Aug 2019 15:56:17 +0000
(16:56 +0100)
src/jalview/ext/jmol/JalviewJmolBinding.java
patch
|
blob
|
history
src/jalview/gui/AppJmol.java
patch
|
blob
|
history
src/jalview/gui/ChimeraViewFrame.java
patch
|
blob
|
history
src/jalview/gui/StructureViewerBase.java
patch
|
blob
|
history
src/jalview/structures/models/AAStructureBindingModel.java
patch
|
blob
|
history
diff --git
a/src/jalview/ext/jmol/JalviewJmolBinding.java
b/src/jalview/ext/jmol/JalviewJmolBinding.java
index
2a9a698
..
d820273
100644
(file)
--- a/
src/jalview/ext/jmol/JalviewJmolBinding.java
+++ b/
src/jalview/ext/jmol/JalviewJmolBinding.java
@@
-133,9
+133,12
@@
public abstract class JalviewJmolBinding extends AAStructureBindingModel
}
/**
}
/**
- * prepare the view for a given set of models/chains. chainList contains
- * strings of the form 'pdbfilename:Chaincode'
+ * prepare the view for a given set of models/chains. chainList contains strings
+ * of the form 'pdbfilename:Chaincode'
+ *
+ * @deprecated now only used by applet code
*/
*/
+ @Deprecated
public void centerViewer()
{
StringBuilder cmd = new StringBuilder(128);
public void centerViewer()
{
StringBuilder cmd = new StringBuilder(128);
@@
-1440,10
+1443,10
@@
public abstract class JalviewJmolBinding extends AAStructureBindingModel
{
cmd.append("hide *;");
{
cmd.append("hide *;");
- AtomSpecModel model = getShownResidues(av);
- String atomSpec = JmolCommands.getAtomSpec(model);
+ AtomSpecModel model = getShownResidues(av);
+ String atomSpec = JmolCommands.getAtomSpec(model);
- cmd.append("display ").append(atomSpec);
+ cmd.append("display ").append(atomSpec);
}
else
{
}
else
{
@@
-1452,7
+1455,7
@@
public abstract class JalviewJmolBinding extends AAStructureBindingModel
cmd.append("; cartoon");
if (refocus)
{
cmd.append("; cartoon");
if (refocus)
{
- cmd.append("; zoom 100");
+ cmd.append("; zoom 0");
}
evalStateCommand(cmd.toString());
}
}
evalStateCommand(cmd.toString());
}
diff --git
a/src/jalview/gui/AppJmol.java
b/src/jalview/gui/AppJmol.java
index
9179be6
..
205c33b
100644
(file)
--- a/
src/jalview/gui/AppJmol.java
+++ b/
src/jalview/gui/AppJmol.java
@@
-259,13
+259,6
@@
public class AppJmol extends StructureViewerBase
}
@Override
}
@Override
- void showSelectedChains()
- {
- setSelectedChains();
- jmb.centerViewer();
- }
-
- @Override
public void closeViewer(boolean closeExternalViewer)
{
// Jmol does not use an external viewer
public void closeViewer(boolean closeExternalViewer)
{
// Jmol does not use an external viewer
diff --git
a/src/jalview/gui/ChimeraViewFrame.java
b/src/jalview/gui/ChimeraViewFrame.java
index
1a5ed5e
..
71e90d9
100644
(file)
--- a/
src/jalview/gui/ChimeraViewFrame.java
+++ b/
src/jalview/gui/ChimeraViewFrame.java
@@
-357,20
+357,6
@@
public class ChimeraViewFrame extends StructureViewerBase
}
/**
}
/**
- * Show only the selected chain(s) in the viewer
- */
- @Override
- void showSelectedChains()
- {
- setSelectedChains();
-
- /*
- * refresh display without resizing - easier to see what changed
- */
- jmb.showStructures(getAlignmentPanel().getAlignViewport(), false);
- }
-
- /**
* Close down this instance of Jalview's Chimera viewer, giving the user the
* option to close the associated Chimera window (process). They may wish to
* keep it open until they have had an opportunity to save any work.
* Close down this instance of Jalview's Chimera viewer, giving the user the
* option to close the associated Chimera window (process). They may wish to
* keep it open until they have had an opportunity to save any work.
diff --git
a/src/jalview/gui/StructureViewerBase.java
b/src/jalview/gui/StructureViewerBase.java
index
2ffcee1
..
d04d1d6
100644
(file)
--- a/
src/jalview/gui/StructureViewerBase.java
+++ b/
src/jalview/gui/StructureViewerBase.java
@@
-556,8
+556,6
@@
public abstract class StructureViewerBase extends GStructureViewer
}
}
}
}
- abstract void showSelectedChains();
-
/**
* Action on selecting one of Jalview's registered colour schemes
*/
/**
* Action on selecting one of Jalview's registered colour schemes
*/
@@
-1069,4
+1067,21
@@
public abstract class StructureViewerBase extends GStructureViewer
toFront();
}
toFront();
}
+ @Override
+ public abstract AAStructureBindingModel getBinding();
+
+ /**
+ * Show only the selected chain(s) in the viewer
+ */
+ protected void showSelectedChains()
+ {
+ setSelectedChains();
+
+ /*
+ * refresh display without resizing - easier to see what changed
+ */
+ getBinding().showStructures(getAlignmentPanel().getAlignViewport(),
+ false);
+ }
+
}
}
diff --git
a/src/jalview/structures/models/AAStructureBindingModel.java
b/src/jalview/structures/models/AAStructureBindingModel.java
index
47e7f30
..
8a7c355
100644
(file)
--- a/
src/jalview/structures/models/AAStructureBindingModel.java
+++ b/
src/jalview/structures/models/AAStructureBindingModel.java
@@
-108,7
+108,7
@@
public abstract class AAStructureBindingModel
* a list of chains "pdbid:chainid" to show in the viewer;
* empty means show all
*/
* a list of chains "pdbid:chainid" to show in the viewer;
* empty means show all
*/
- // TODO make private once showStructures() deals with this
+ // TODO make private once deprecated JalviewJmolBinding.centerViewer removed
protected List<String> chainsToShow;
private boolean hideHiddenRegions;
protected List<String> chainsToShow;
private boolean hideHiddenRegions;