X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceGroup.java;h=0cf954b44d127b98edebac6c0dc5a6ad342e0972;hb=39d42f25edeb526275d178e0259e767e7c29bd78;hp=4c6420c0082e69f77863da4fdd68465c9c516c5c;hpb=b6401ce0eeaf81c8a5ee8051d109fb581cb42eab;p=jalview.git diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 4c6420c..0cf954b 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -47,6 +47,43 @@ public class SequenceGroup endRes = end; } + public boolean adjustForRemoveLeft(int col) + { + // return value is true if the group still exists + if(startRes>=col) + startRes = startRes - col; + if(endRes>=col) + { + endRes = endRes - col; + if(startRes>endRes) + startRes = 0; + } + else + { + // must delete this group!! + return false; + } + + return true; + } + + public boolean adjustForRemoveRight(int col) + { + + if(startRes>col) + { + // delete this group + return false; + } + + if(endRes>=col) + endRes = col; + + + return true; + } + + public String getName() { return groupName;