Merge branch 'develop' into feature/JAL-2422ChimeraX
[jalview.git] / src / jalview / structure / StructureCommandsFactory.java
1 package jalview.structure;
2
3 import jalview.ext.jmol.JmolCommands;
4 import jalview.ext.rbvi.chimera.ChimeraCommands;
5 import jalview.ext.rbvi.chimera.ChimeraXCommands;
6 import jalview.gui.StructureViewer.ViewerType;
7
8 /**
9  * A factory that serves a class that can generate structure commands for a
10  * specified structure viewer
11  */
12 public class StructureCommandsFactory
13 {
14   public StructureCommandsI getStructureCommands(ViewerType viewer)
15   {
16     StructureCommandsI commands = null;
17     switch (viewer)
18     {
19     case JMOL:
20       commands = new JmolCommands();
21       break;
22     case CHIMERA:
23       commands = new ChimeraCommands();
24       break;
25     case CHIMERAX:
26       commands = new ChimeraXCommands();
27       break;
28     default:
29     }
30     return commands;
31   }
32 }