Class DefaultMatrixMapper
- java.lang.Object
-
- org.biojava.nbio.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
Constructors Constructor Description DefaultMatrixMapper(double scale, float saturation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColor(double value)floatgetSaturation()doublegetScalevalue()voidsetSaturation(float saturation)voidsetScalevalue(double scalevalue)
-
-
-
Method Detail
-
getColor
public Color getColor(double value)
- Specified by:
getColorin interfaceContinuousColorMapper- 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
-
-