AddOrRemove function added, start and end res fixed
authoramwaterhouse <Andrew Waterhouse>
Tue, 14 Dec 2004 11:19:04 +0000 (11:19 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 14 Dec 2004 11:19:04 +0000 (11:19 +0000)
src/jalview/datamodel/SequenceGroup.java

index 6bccec3..d8c5c93 100755 (executable)
@@ -19,8 +19,8 @@ public class SequenceGroup
   public Vector sequences = new Vector();\r
   int width = -1;\r
   public ColourSchemeI cs;\r
-  int startRes = 20;\r
-  int endRes = 35;\r
+  int startRes = 0;\r
+  int endRes = 0;\r
 \r
   public SequenceGroup()\r
   {\r
@@ -37,7 +37,9 @@ public class SequenceGroup
                        boolean isSelected,\r
                        boolean displayBoxes, boolean displayText,\r
                        boolean colourText,\r
-                       boolean display)\r
+                       boolean display,\r
+                       int start,\r
+                       int end)\r
   {\r
 \r
     this.groupName = groupName;\r
@@ -47,6 +49,8 @@ public class SequenceGroup
     this.colourText = colourText;\r
     this.display = display;\r
     this.cs = scheme;\r
+    startRes = start;\r
+    endRes = end;\r
   }\r
 \r
   public String getName()\r
@@ -75,6 +79,14 @@ public class SequenceGroup
       sequences.addElement(s);\r
   }\r
 \r
+  public void addOrRemove(SequenceI s)\r
+  {\r
+    if(sequences.contains(s))\r
+      deleteSequence(s);\r
+    else\r
+      addSequence(s);\r
+  }\r
+\r
   public void deleteSequence(SequenceI s)\r
   {\r
     sequences.removeElement(s);\r