*/
public class ChimeraCommands extends StructureCommandsBase
{
+ private static final StructureCommand CLOSE_CHIMERA = new StructureCommand("stop really");
+
+ private static final StructureCommand STOP_NOTIFY_SELECTION = new StructureCommand("listen stop selection");
+
+ private static final StructureCommand STOP_NOTIFY_MODELS = new StructureCommand("listen stop models");
+
+ private static final StructureCommand GET_SELECTION = new StructureCommand("list selection level residue");
+
private static final StructureCommand SHOW_BACKBONE = new StructureCommand(
"~display all;~ribbon;chain @CA|P");
public StructureCommandI closeViewer()
{
// https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/stop.html
- return new StructureCommand("stop really");
+ return CLOSE_CHIMERA;
+ }
+
+ @Override
+ public List<StructureCommandI> startNotifications(String uri)
+ {
+ // https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/listen.html
+ List<StructureCommandI> cmds = new ArrayList<>();
+ cmds.add(new StructureCommand("listen start models url " + uri));
+ cmds.add(new StructureCommand("listen start select prefix SelectionChanged url " + uri));
+ return cmds;
+ }
+
+ @Override
+ public List<StructureCommandI> stopNotifications()
+ {
+ // https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/listen.html
+ List<StructureCommandI> cmds = new ArrayList<>();
+ cmds.add(STOP_NOTIFY_MODELS);
+ cmds.add(STOP_NOTIFY_SELECTION);
+ return cmds;
+ }
+
+ @Override
+ public StructureCommandI getSelectedResidues()
+ {
+ return GET_SELECTION;
}
}