org.biojava.bio.structure.gui.util.color
Class DefaultMatrixMapper

java.lang.Object
  extended by org.biojava.bio.structure.gui.util.color.DefaultMatrixMapper
All Implemented Interfaces:
ContinuousColorMapper

public class DefaultMatrixMapper
extends Object
implements ContinuousColorMapper

Color Mapper which mimics the default coloring of JMatrixPanel pixels. Assumes inputs in the range [0,max]. These are mapped to HSB colors such that the hue and brightness are from [1,0].

Author:
Spencer Bliven

Constructor Summary
DefaultMatrixMapper(double scale, float saturation)
           
 
Method Summary
 Color getColor(double value)
           
 float getSaturation()
           
 double getScalevalue()
           
 void setSaturation(float saturation)
           
 void setScalevalue(double scalevalue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMatrixMapper

public DefaultMatrixMapper(double scale,
                           float saturation)
Method Detail

getColor

public Color getColor(double value)
Specified by:
getColor in interface ContinuousColorMapper
Parameters:
value -
Returns:
See Also:
ContinuousColorMapper.getColor(double)

getScalevalue

public double getScalevalue()
Returns:
the scalevalue

setScalevalue

public void setScalevalue(double scalevalue)
Parameters:
scalevalue - the scalevalue to set

getSaturation

public float getSaturation()
Returns:
the saturation

setSaturation

public void setSaturation(float saturation)
Parameters:
saturation - the saturation to set