+++ /dev/null
-/*\r
-* Jalview - A Sequence Alignment Editor and Viewer\r
-* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
-*\r
-* This program is free software; you can redistribute it and/or\r
-* modify it under the terms of the GNU General Public License\r
-* as published by the Free Software Foundation; either version 2\r
-* of the License, or (at your option) any later version.\r
-*\r
-* This program is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-* GNU General Public License for more details.\r
-*\r
-* You should have received a copy of the GNU General Public License\r
-* along with this program; if not, write to the Free Software\r
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\r
-*/\r
-package jalview.datamodel;\r
-\r
-import jalview.schemes.*;\r
-\r
-import java.util.*;\r
-\r
-\r
-/**\r
- * DOCUMENT ME!\r
- *\r
- * @author $author$\r
- * @version $Revision$\r
- */\r
-public class SuperGroup\r
-{\r
- String groupName;\r
- boolean displayBoxes;\r
- boolean displayText;\r
- boolean colourText;\r
-\r
- /** DOCUMENT ME!! */\r
- public ColourSchemeI cs;\r
- Vector sequenceGroups = new Vector();\r
-\r
- /**\r
- * Creates a new SuperGroup object.\r
- */\r
- public SuperGroup()\r
- {\r
- groupName = "Super group";\r
- this.displayBoxes = true;\r
- this.displayText = true;\r
- this.colourText = false;\r
- cs = null;\r
- }\r
-\r
- /**\r
- * Creates a new SuperGroup object.\r
- *\r
- * @param groupName DOCUMENT ME!\r
- * @param scheme DOCUMENT ME!\r
- * @param displayBoxes DOCUMENT ME!\r
- * @param displayText DOCUMENT ME!\r
- * @param colourText DOCUMENT ME!\r
- */\r
- public SuperGroup(String groupName, ColourSchemeI scheme,\r
- boolean displayBoxes, boolean displayText, boolean colourText)\r
- {\r
- this.groupName = groupName;\r
- this.displayBoxes = displayBoxes;\r
- this.displayText = displayText;\r
- this.colourText = colourText;\r
- this.cs = scheme;\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @return DOCUMENT ME!\r
- */\r
- public String getName()\r
- {\r
- return groupName;\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param name DOCUMENT ME!\r
- */\r
- public void setName(String name)\r
- {\r
- groupName = name;\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param sg DOCUMENT ME!\r
- */\r
- public void addGroup(SequenceGroup sg)\r
- {\r
- if (!sequenceGroups.contains(sg))\r
- {\r
- sequenceGroups.addElement(sg);\r
- }\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param sg DOCUMENT ME!\r
- */\r
- public void addOrRemove(SequenceGroup sg)\r
- {\r
- if (sequenceGroups.contains(sg))\r
- {\r
- deleteGroup(sg);\r
- }\r
- else\r
- {\r
- addGroup(sg);\r
- }\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param sg DOCUMENT ME!\r
- */\r
- public void deleteGroup(SequenceGroup sg)\r
- {\r
- sequenceGroups.removeElement(sg);\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param sg DOCUMENT ME!\r
- */\r
- public void setSuperGroupProperties(SequenceGroup sg)\r
- {\r
- cs = sg.cs;\r
- colourText = sg.colourText;\r
- displayText = sg.displayText;\r
- displayBoxes = sg.displayBoxes;\r
-\r
- for (int i = 0; i < sequenceGroups.size(); i++)\r
- {\r
- SequenceGroup temp = (SequenceGroup) sequenceGroups.elementAt(i);\r
- temp.cs = sg.cs;\r
- temp.colourText = sg.colourText;\r
- temp.displayText = sg.displayText;\r
- temp.displayBoxes = sg.displayBoxes;\r
- }\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @return DOCUMENT ME!\r
- */\r
- public int getSize()\r
- {\r
- return sequenceGroups.size();\r
- }\r
-\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param i DOCUMENT ME!\r
- *\r
- * @return DOCUMENT ME!\r
- */\r
- public SequenceGroup getGroupeAt(int i)\r
- {\r
- return (SequenceGroup) sequenceGroups.elementAt(i);\r
- }\r
-}\r