X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSuperGroup.java;h=6c0e6048724b4ab427ed1dea29a69772d7dae276;hb=d03971168d7f0192862cf5b57602ecf3e341b457;hp=6c4da298c861581ba997552d876d1777f7935e29;hpb=3ac9a19998fe3b2f4e4583bed327a13ca80c874b;p=jalview.git diff --git a/src/jalview/datamodel/SuperGroup.java b/src/jalview/datamodel/SuperGroup.java index 6c4da29..6c0e604 100755 --- a/src/jalview/datamodel/SuperGroup.java +++ b/src/jalview/datamodel/SuperGroup.java @@ -1,95 +1,177 @@ +/* +* 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 java.util.*; + +/** + * DOCUMENT ME! + * + * @author $author$ + * @version $Revision$ + */ public class SuperGroup { - String groupName; - boolean displayBoxes; - boolean displayText; - boolean colourText; - public ColourSchemeI cs; - ArrayList sequenceGroups = new ArrayList(); - - 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.add(sg); - } - - public void addOrRemove(SequenceGroup sg) - { - if(sequenceGroups.contains(sg)) - deleteGroup(sg); - else - addGroup(sg); - } - - public void deleteGroup(SequenceGroup sg) - { - sequenceGroups.remove(sg); - } - - public void setSuperGroupProperties(SequenceGroup sg) - { - cs = sg.cs; - colourText = sg.colourText; - displayText = sg.displayText; - displayBoxes = sg.displayBoxes; - - for(int i=0; i