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