2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.datamodel;
\r
21 import jalview.schemes.*;
\r
30 * @version $Revision$
\r
32 public class SuperGroup
\r
35 boolean displayBoxes;
\r
36 boolean displayText;
\r
39 /** DOCUMENT ME!! */
\r
40 public ColourSchemeI cs;
\r
41 Vector sequenceGroups = new Vector();
\r
44 * Creates a new SuperGroup object.
\r
48 groupName = "Super group";
\r
49 this.displayBoxes = true;
\r
50 this.displayText = true;
\r
51 this.colourText = false;
\r
56 * Creates a new SuperGroup object.
\r
58 * @param groupName DOCUMENT ME!
\r
59 * @param scheme DOCUMENT ME!
\r
60 * @param displayBoxes DOCUMENT ME!
\r
61 * @param displayText DOCUMENT ME!
\r
62 * @param colourText DOCUMENT ME!
\r
64 public SuperGroup(String groupName, ColourSchemeI scheme,
\r
65 boolean displayBoxes, boolean displayText, boolean colourText)
\r
67 this.groupName = groupName;
\r
68 this.displayBoxes = displayBoxes;
\r
69 this.displayText = displayText;
\r
70 this.colourText = colourText;
\r
77 * @return DOCUMENT ME!
\r
79 public String getName()
\r
87 * @param name DOCUMENT ME!
\r
89 public void setName(String name)
\r
97 * @param sg DOCUMENT ME!
\r
99 public void addGroup(SequenceGroup sg)
\r
101 if (!sequenceGroups.contains(sg))
\r
103 sequenceGroups.addElement(sg);
\r
110 * @param sg DOCUMENT ME!
\r
112 public void addOrRemove(SequenceGroup sg)
\r
114 if (sequenceGroups.contains(sg))
\r
127 * @param sg DOCUMENT ME!
\r
129 public void deleteGroup(SequenceGroup sg)
\r
131 sequenceGroups.removeElement(sg);
\r
137 * @param sg DOCUMENT ME!
\r
139 public void setSuperGroupProperties(SequenceGroup sg)
\r
142 colourText = sg.colourText;
\r
143 displayText = sg.displayText;
\r
144 displayBoxes = sg.displayBoxes;
\r
146 for (int i = 0; i < sequenceGroups.size(); i++)
\r
148 SequenceGroup temp = (SequenceGroup) sequenceGroups.elementAt(i);
\r
150 temp.colourText = sg.colourText;
\r
151 temp.displayText = sg.displayText;
\r
152 temp.displayBoxes = sg.displayBoxes;
\r
159 * @return DOCUMENT ME!
\r
161 public int getSize()
\r
163 return sequenceGroups.size();
\r
169 * @param i DOCUMENT ME!
\r
171 * @return DOCUMENT ME!
\r
173 public SequenceGroup getGroupeAt(int i)
\r
175 return (SequenceGroup) sequenceGroups.elementAt(i);
\r