Merge commit
[jalview.git] / src / jalview / structure / CommandListener.java
diff --git a/src/jalview/structure/CommandListener.java b/src/jalview/structure/CommandListener.java
new file mode 100644 (file)
index 0000000..e5f3e36
--- /dev/null
@@ -0,0 +1,35 @@
+package jalview.structure;
+
+import jalview.commands.CommandI;
+
+/**
+ * Defines a listener for commands performed on another alignment. This is to
+ * support linked editing of two alternative representations of an alignment (in
+ * particular, cDNA and protein).
+ * 
+ * @author gmcarstairs
+ *
+ */
+public interface CommandListener
+{
+  /**
+   * The listener may attempt to perform the specified command; the region acted
+   * on is determined by a callback to the StructureSelectionManager (which
+   * holds mappings between alignments).
+   * 
+   * @param command
+   * @param undo
+   * @param ssm
+   * @param source
+   *          the originator of the command
+   */
+  public void mirrorCommand(CommandI command, boolean undo,
+          StructureSelectionManager ssm, VamsasSource source);
+
+  /**
+   * Temporary workaround to make check for source == listener work.
+   * 
+   * @return
+   */
+  public VamsasSource getVamsasSource();
+}