X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fcommands%2FEditCommand.java;h=d41f9f8b04b8184208123ee89ae62fd5fbab8219;hb=7796bc87c98b21f199f9dc195401223984619091;hp=76ddbac87349ab883a0e527664526d68aba576c6;hpb=797df64fa2a0a30773d0f48f5494d4155e5a8be3;p=jalview.git
diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java
index 76ddbac..d41f9f8 100644
--- a/src/jalview/commands/EditCommand.java
+++ b/src/jalview/commands/EditCommand.java
@@ -1,18 +1,18 @@
/*
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
* Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
- *
+ *
* This file is part of Jalview.
- *
+ *
* Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
+ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License along with Jalview. If not, see
* Title: EditCommmand *
- * + * ** Description: Essential information for performing undo and redo for cut/paste * insert/delete gap which can be stored in the HistoryList *
- * + * ** Copyright: Copyright (c) 2006 *
- * + * ** Company: Dundee University *
- * + * * @author not attributable * @version 1.0 */ @@ -54,7 +54,7 @@ public class EditCommand implements CommandI public static final int PASTE = 3; public static final int REPLACE = 4; - + public static final int INSERT_NUC=5; Edit[] edits; @@ -96,11 +96,13 @@ public class EditCommand implements CommandI performEdit(0, null); } + @Override final public String getDescription() { return description; } + @Override public int getSize() { return edits == null ? 0 : edits.length; @@ -116,7 +118,7 @@ public class EditCommand implements CommandI * operation affects more alignment objects than the one referenced in al (for * example, cut or pasting whole sequences). Use the form with an additional * AlignmentI[] views parameter. - * + * * @param command * @param seqs * @param position @@ -133,7 +135,7 @@ public class EditCommand implements CommandI /** * append a new edit command with a set of alignment views that may be * operated on - * + * * @param command * @param seqs * @param position @@ -202,11 +204,13 @@ public class EditCommand implements CommandI } } + @Override final public void doCommand(AlignmentI[] views) { performEdit(0, views); } + @Override final public void undoCommand(AlignmentI[] views) { int e = 0, eSize = edits.length; @@ -245,7 +249,7 @@ public class EditCommand implements CommandI adjustAnnotations(command, true, false, null); } -// +// // final void insertNuc(Edit command) // { // @@ -344,8 +348,10 @@ public class EditCommand implements CommandI // read it to the alignment if (command.alIndex[i] < command.al.getHeight()) { - command.al.getSequences().insertElementAt(command.seqs[i], - command.alIndex[i]); + List