--- /dev/null
+package jalview.structure;
+
+import jalview.ext.jmol.JmolCommands;
+import jalview.ext.rbvi.chimera.ChimeraCommands;
+import jalview.ext.rbvi.chimera.ChimeraXCommands;
+import jalview.gui.StructureViewer.ViewerType;
+
+/**
+ * A factory that serves a class that can generate structure commands for a
+ * specified structure viewer
+ */
+public class StructureCommandsFactory
+{
+ public StructureCommandsI getStructureCommands(ViewerType viewer)
+ {
+ StructureCommandsI commands = null;
+ switch (viewer)
+ {
+ case JMOL:
+ commands = new JmolCommands();
+ break;
+ case CHIMERA:
+ commands = new ChimeraCommands();
+ break;
+ case CHIMERAX:
+ commands = new ChimeraXCommands();
+ break;
+ default:
+ }
+ return commands;
+ }
+}