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.datamodel.*;
\r
23 import jalview.schemes.*;
\r
32 * @version $Revision$
\r
34 public class SuperGroup
\r
37 boolean displayBoxes;
\r
38 boolean displayText;
\r
41 /** DOCUMENT ME!! */
\r
42 public ColourSchemeI cs;
\r
43 Vector sequenceGroups = new Vector();
\r
46 * Creates a new SuperGroup object.
\r
50 groupName = "Super group";
\r
51 this.displayBoxes = true;
\r
52 this.displayText = true;
\r
53 this.colourText = false;
\r
58 * Creates a new SuperGroup object.
\r
60 * @param groupName DOCUMENT ME!
\r
61 * @param scheme DOCUMENT ME!
\r
62 * @param displayBoxes DOCUMENT ME!
\r
63 * @param displayText DOCUMENT ME!
\r
64 * @param colourText DOCUMENT ME!
\r
66 public SuperGroup(String groupName, ColourSchemeI scheme,
\r
67 boolean displayBoxes, boolean displayText, boolean colourText)
\r
69 this.groupName = groupName;
\r
70 this.displayBoxes = displayBoxes;
\r
71 this.displayText = displayText;
\r
72 this.colourText = colourText;
\r
79 * @return DOCUMENT ME!
\r
81 public String getName()
\r
89 * @param name DOCUMENT ME!
\r
91 public void setName(String name)
\r
99 * @param sg DOCUMENT ME!
\r
101 public void addGroup(SequenceGroup sg)
\r
103 if (!sequenceGroups.contains(sg))
\r
105 sequenceGroups.addElement(sg);
\r
112 * @param sg DOCUMENT ME!
\r
114 public void addOrRemove(SequenceGroup sg)
\r
116 if (sequenceGroups.contains(sg))
\r
129 * @param sg DOCUMENT ME!
\r
131 public void deleteGroup(SequenceGroup sg)
\r
133 sequenceGroups.removeElement(sg);
\r
139 * @param sg DOCUMENT ME!
\r
141 public void setSuperGroupProperties(SequenceGroup sg)
\r
144 colourText = sg.colourText;
\r
145 displayText = sg.displayText;
\r
146 displayBoxes = sg.displayBoxes;
\r
148 for (int i = 0; i < sequenceGroups.size(); i++)
\r
150 SequenceGroup temp = (SequenceGroup) sequenceGroups.elementAt(i);
\r
152 temp.colourText = sg.colourText;
\r
153 temp.displayText = sg.displayText;
\r
154 temp.displayBoxes = sg.displayBoxes;
\r
161 * @return DOCUMENT ME!
\r
163 public int getSize()
\r
165 return sequenceGroups.size();
\r
171 * @param i DOCUMENT ME!
\r
173 * @return DOCUMENT ME!
\r
175 public SequenceGroup getGroupeAt(int i)
\r
177 return (SequenceGroup) sequenceGroups.elementAt(i);
\r