uk.ac.man.bioinf.gui.color
Class IndividualElementColorMap

java.lang.Object
  |
  +--uk.ac.man.bioinf.gui.color.IndividualElementColorMap
All Implemented Interfaces:
ColorMap

public class IndividualElementColorMap
extends Object
implements ColorMap

IndividualElementColorMap.java Allows a direct mapping between an element and a color; thereby every element in a sequence type will have an associated color. NB: This class is NOT synchronized. Created: Thu Apr 6 13:13:24 2000

Version:
$Id: IndividualElementColorMap.java,v 1.8 2001/07/06 11:52:51 lord Exp $
Author:
J Selley

Constructor Summary
IndividualElementColorMap(String name, Element[] elements, Color[] colors)
           
 
Method Summary
 Color getColorAt(SequenceAlignment sa, Element element, SequenceAlignmentPoint point)
          Returns the color for an element at a specific position in the alignment.
 String getName()
          Returns the name of this color map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndividualElementColorMap

public IndividualElementColorMap(String name,
                                 Element[] elements,
                                 Color[] colors)
Method Detail

getColorAt

public Color getColorAt(SequenceAlignment sa,
                        Element element,
                        SequenceAlignmentPoint point)
Returns the color for an element at a specific position in the alignment. [from ColorMap] NB: In this case, this simply identifies the element and returns the color for that element.

Specified by:
getColorAt in interface ColorMap
Parameters:
sa - the sequence alignment
element - the element from the position in the SA
point - the position in the SA
Returns:
the color of the element

getName

public String getName()
Returns the name of this color map.

Specified by:
getName in interface ColorMap
Returns:
the color map name