+/*\r
+* Jalview - A Sequence Alignment Editor and Viewer\r
+* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+*\r
+* This program is free software; you can redistribute it and/or\r
+* modify it under the terms of the GNU General Public License\r
+* as published by the Free Software Foundation; either version 2\r
+* of the License, or (at your option) any later version.\r
+*\r
+* This program is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with this program; if not, write to the Free Software\r
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\r
+*/\r
package jalview.datamodel;\r
\r
import java.util.*;\r
\r
+\r
+/**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @author $author$\r
+ * @version $Revision$\r
+ */\r
public class HistoryItem\r
{\r
- public static final int EDIT = 0;\r
- public static final int SORT = 1;\r
- public static final int HIDE = 2;\r
- public static final int PASTE= 3;\r
-\r
- final int type;\r
- Vector sequences;\r
- Vector alignIndex;\r
- String description;\r
- Vector hiddenSeqs;\r
-\r
- public HistoryItem(String description, AlignmentI al, int type)\r
- {\r
- this.type = type;\r
- this.description = description;\r
- sequences = new Vector();\r
- alignIndex = new Vector();\r
- hiddenSeqs = new Vector();\r
-\r
- for (int i = 0; i < al.getHeight(); i++)\r
+ /** DOCUMENT ME!! */\r
+ public static final int EDIT = 0;\r
+\r
+ /** DOCUMENT ME!! */\r
+ public static final int SORT = 1;\r
+\r
+ /** DOCUMENT ME!! */\r
+ public static final int HIDE = 2;\r
+\r
+ /** DOCUMENT ME!! */\r
+ public static final int PASTE = 3;\r
+ final int type;\r
+ Vector sequences;\r
+ Vector alignIndex;\r
+ String description;\r
+ Vector hiddenSeqs;\r
+\r
+ /**\r
+ * Creates a new HistoryItem object.\r
+ *\r
+ * @param description DOCUMENT ME!\r
+ * @param al DOCUMENT ME!\r
+ * @param type DOCUMENT ME!\r
+ */\r
+ public HistoryItem(String description, AlignmentI al, int type)\r
{\r
- SequenceI seq = al.getSequenceAt(i);\r
- sequences.addElement(seq);\r
- alignIndex.addElement(i + "");\r
- hiddenSeqs.addElement(seq.getSequence().toString());\r
- }\r
- }\r
+ this.type = type;\r
+ this.description = description;\r
+ sequences = new Vector();\r
+ alignIndex = new Vector();\r
+ hiddenSeqs = new Vector();\r
\r
- public int getType()\r
- {return type;}\r
+ for (int i = 0; i < al.getHeight(); i++)\r
+ {\r
+ SequenceI seq = al.getSequenceAt(i);\r
+ sequences.addElement(seq);\r
+ alignIndex.addElement(i + "");\r
+ hiddenSeqs.addElement(seq.getSequence().toString());\r
+ }\r
+ }\r
\r
- public Vector getSequences()\r
- {return sequences;}\r
+ /**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @return DOCUMENT ME!\r
+ */\r
+ public int getType()\r
+ {\r
+ return type;\r
+ }\r
\r
- public String getDescription()\r
- {return description; }\r
+ /**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @return DOCUMENT ME!\r
+ */\r
+ public Vector getSequences()\r
+ {\r
+ return sequences;\r
+ }\r
\r
- public Vector getHidden()\r
- { return hiddenSeqs; }\r
+ /**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @return DOCUMENT ME!\r
+ */\r
+ public String getDescription()\r
+ {\r
+ return description;\r
+ }\r
\r
- public int getAlignIndex(int seq)\r
- {\r
- return Integer.parseInt(alignIndex.elementAt(seq).toString());\r
- }\r
+ /**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @return DOCUMENT ME!\r
+ */\r
+ public Vector getHidden()\r
+ {\r
+ return hiddenSeqs;\r
+ }\r
\r
+ /**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @param seq DOCUMENT ME!\r
+ *\r
+ * @return DOCUMENT ME!\r
+ */\r
+ public int getAlignIndex(int seq)\r
+ {\r
+ return Integer.parseInt(alignIndex.elementAt(seq).toString());\r
+ }\r
}\r