1 package jalview.datamodel;
\r
3 import jalview.schemes.*;
\r
4 import jalview.analysis.*;
\r
5 import jalview.datamodel.*;
\r
8 public class SuperGroup
\r
11 boolean displayBoxes;
\r
12 boolean displayText;
\r
14 public ColourSchemeI cs;
\r
15 ArrayList sequenceGroups = new ArrayList();
\r
19 groupName = "Super group";
\r
20 this.displayBoxes = true;
\r
21 this.displayText = true;
\r
22 this.colourText = false;
\r
27 public SuperGroup(String groupName, ColourSchemeI scheme,
\r
28 boolean displayBoxes, boolean displayText,
\r
31 this.groupName = groupName;
\r
32 this.displayBoxes = displayBoxes;
\r
33 this.displayText = displayText;
\r
34 this.colourText = colourText;
\r
38 public String getName()
\r
43 public void setName(String name)
\r
49 public void addGroup(SequenceGroup sg)
\r
51 if(!sequenceGroups.contains(sg))
\r
52 sequenceGroups.add(sg);
\r
55 public void addOrRemove(SequenceGroup sg)
\r
57 if(sequenceGroups.contains(sg))
\r
63 public void deleteGroup(SequenceGroup sg)
\r
65 sequenceGroups.remove(sg);
\r
68 public void setSuperGroupProperties(SequenceGroup sg)
\r
71 colourText = sg.colourText;
\r
72 displayText = sg.displayText;
\r
73 displayBoxes = sg.displayBoxes;
\r
75 for(int i=0; i<sequenceGroups.size(); i++)
\r
77 SequenceGroup temp = (SequenceGroup)sequenceGroups.get(i);
\r
79 temp.colourText = sg.colourText;
\r
80 temp.displayText = sg.displayText;
\r
81 temp.displayBoxes = sg.displayBoxes;
\r
86 public int getSize()
\r
88 return sequenceGroups.size();
\r
91 public SequenceGroup getGroupeAt(int i)
\r
93 return (SequenceGroup) sequenceGroups.get(i);
\r