From f7c72258edbc607b5d326c7f80b8d76cde51b17b Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 14 Dec 2004 11:19:04 +0000 Subject: [PATCH] AddOrRemove function added, start and end res fixed --- src/jalview/datamodel/SequenceGroup.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 6bccec3..d8c5c93 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -19,8 +19,8 @@ public class SequenceGroup public Vector sequences = new Vector(); int width = -1; public ColourSchemeI cs; - int startRes = 20; - int endRes = 35; + int startRes = 0; + int endRes = 0; public SequenceGroup() { @@ -37,7 +37,9 @@ public class SequenceGroup boolean isSelected, boolean displayBoxes, boolean displayText, boolean colourText, - boolean display) + boolean display, + int start, + int end) { this.groupName = groupName; @@ -47,6 +49,8 @@ public class SequenceGroup this.colourText = colourText; this.display = display; this.cs = scheme; + startRes = start; + endRes = end; } public String getName() @@ -75,6 +79,14 @@ public class SequenceGroup sequences.addElement(s); } + public void addOrRemove(SequenceI s) + { + if(sequences.contains(s)) + deleteSequence(s); + else + addSequence(s); + } + public void deleteSequence(SequenceI s) { sequences.removeElement(s); -- 1.7.10.2