X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSuperGroup.java;h=b2993b5a1871a8af53aef67364875edf8325e8ce;hb=b8d09897dacc7b0ad203982b4578e2c1d8929142;hp=4e2ac1cad48b822a3dd2a9e6b5a74fae5a509cd3;hpb=00b702186f1676036db687a8df5d335a4d5da54d;p=jalview.git diff --git a/src/jalview/datamodel/SuperGroup.java b/src/jalview/datamodel/SuperGroup.java index 4e2ac1c..b2993b5 100755 --- a/src/jalview/datamodel/SuperGroup.java +++ b/src/jalview/datamodel/SuperGroup.java @@ -1,95 +1,179 @@ +/* +* Jalview - A Sequence Alignment Editor and Viewer +* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program 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 this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +*/ package jalview.datamodel; -import jalview.schemes.*; -import jalview.analysis.*; import jalview.datamodel.*; + +import jalview.schemes.*; + import java.util.*; + +/** + * DOCUMENT ME! + * + * @author $author$ + * @version $Revision$ + */ public class SuperGroup { - String groupName; - boolean displayBoxes; - boolean displayText; - boolean colourText; - public ColourSchemeI cs; - Vector sequenceGroups = new Vector(); - - public SuperGroup() - { - groupName = "Super group"; - this.displayBoxes = true; - this.displayText = true; - this.colourText = false; - cs = null; - } - - - public SuperGroup(String groupName, ColourSchemeI scheme, - boolean displayBoxes, boolean displayText, - boolean colourText) - { - this.groupName = groupName; - this.displayBoxes = displayBoxes; - this.displayText = displayText; - this.colourText = colourText; - this.cs = scheme; - } - - public String getName() - { - return groupName; - } - - public void setName(String name) - { - groupName = name; - } - - - public void addGroup(SequenceGroup sg) - { - if(!sequenceGroups.contains(sg)) - sequenceGroups.addElement(sg); - } - - public void addOrRemove(SequenceGroup sg) - { - if(sequenceGroups.contains(sg)) - deleteGroup(sg); - else - addGroup(sg); - } - - public void deleteGroup(SequenceGroup sg) - { - sequenceGroups.removeElement(sg); - } - - public void setSuperGroupProperties(SequenceGroup sg) - { - cs = sg.cs; - colourText = sg.colourText; - displayText = sg.displayText; - displayBoxes = sg.displayBoxes; - - for(int i=0; i