+
+ /**
+ * @return the idColour
+ */
+ public Color getIdColour()
+ {
+ return idColour;
+ }
+
+ /**
+ * @param idColour
+ * the idColour to set
+ */
+ public void setIdColour(Color idColour)
+ {
+ this.idColour = idColour;
+ }
+
+ /**
+ * @return the representative sequence for this group
+ */
+ public SequenceI getSeqrep()
+ {
+ return seqrep;
+ }
+
+ /**
+ * set the representative sequence for this group.
+ * Note - this affects the interpretation of the Hidereps attribute.
+ * @param seqrep the seqrep to set (null means no sequence representative)
+ */
+ public void setSeqrep(SequenceI seqrep)
+ {
+ this.seqrep = seqrep;
+ }
+ /**
+ *
+ * @return true if group has a sequence representative
+ */
+ public boolean hasSeqrep()
+ {
+ return seqrep != null;
+ }
+ /**
+ * visibility of rows or represented rows covered by group
+ */
+ private boolean hidereps=false;
+ /**
+ * set visibility of sequences covered by (if no sequence representative is defined)
+ * or represented by this group.
+ * @param visibility
+ */
+ public void setHidereps(boolean visibility)
+ {
+ hidereps = visibility;
+ }
+ /**
+ *
+ * @return true if sequences represented (or covered) by this group should be hidden
+ */
+ public boolean isHidereps()
+ {
+ return hidereps;
+ }
+ /**
+ * visibility of columns intersecting this group
+ */
+ private boolean hidecols=false;
+ /**
+ * set intended visibility of columns covered by this group
+ * @param visibility
+ */
+ public void setHideCols(boolean visibility)
+ {
+ hidecols = visibility;
+ }
+ /**
+ *
+ * @return true if columns covered by group should be hidden
+ */
+ public boolean isHideCols()
+ {
+ return hidecols;
+ }
+ /**
+ * create a new sequence group from the intersection of this group
+ * with an alignment Hashtable of hidden representatives
+ *
+ * @param alignment (may not be null)
+ * @param hashtable (may be null)
+ * @return new group containing sequences common to this group and alignment
+ */
+ public SequenceGroup intersect(AlignmentI alignment, Hashtable hashtable)
+ {
+ SequenceGroup sgroup = new SequenceGroup(this);
+ Enumeration en = getSequences(hashtable).elements();
+ while (en.hasMoreElements())
+ {
+ SequenceI elem = (SequenceI) en.nextElement();
+ if (alignment.getSequences().contains(elem))
+ {
+ sgroup.addSequence(elem, false);
+ }
+ }
+ return sgroup;
+ }