1 Clazz.declarePackage ("jalview.commands");
2 Clazz.load (["jalview.commands.CommandI"], "jalview.commands.OrderCommand", ["jalview.analysis.AlignmentSorter"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.description = null;
8 Clazz.instantialize (this, arguments);
9 }, jalview.commands, "OrderCommand", null, jalview.commands.CommandI);
10 Clazz.makeConstructor (c$,
11 function (description, seqs, al) {
12 this.description = description;
14 this.seqs2 = al.getSequencesArray ();
16 this.doCommand (null);
17 }, "~S,~A,jalview.datamodel.AlignmentI");
18 Clazz.overrideMethod (c$, "getDescription",
20 return this.description;
22 Clazz.overrideMethod (c$, "getSize",
26 Clazz.overrideMethod (c$, "doCommand",
28 jalview.analysis.AlignmentSorter.setOrder (this.al, this.seqs2);
30 Clazz.overrideMethod (c$, "undoCommand",
32 jalview.analysis.AlignmentSorter.setOrder (this.al, this.seqs);
34 Clazz.defineMethod (c$, "getSequenceOrder",
36 return undo ? this.seqs : this.seqs2;