}
/**
- * 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);
{
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
{
cmd.append("; cartoon");
if (refocus)
{
- cmd.append("; zoom 100");
+ cmd.append("; zoom 0");
}
evalStateCommand(cmd.toString());
}
}
@Override
- void showSelectedChains()
- {
- setSelectedChains();
- jmb.centerViewer();
- }
-
- @Override
public void closeViewer(boolean closeExternalViewer)
{
// Jmol does not use an external viewer
}
/**
- * 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.
}
}
- abstract void showSelectedChains();
-
/**
* Action on selecting one of Jalview's registered colour schemes
*/
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);
+ }
+
}
* 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;