de.erichseifert.gral.plots.colors
Class ScaledContinuousColorMapper
- java.lang.Object
-
- de.erichseifert.gral.plots.colors.AbstractColorMapper<java.lang.Double>
-
- de.erichseifert.gral.plots.colors.ContinuousColorMapper
-
- de.erichseifert.gral.plots.colors.ScaledContinuousColorMapper
-
- All Implemented Interfaces:
- ColorMapper, java.io.Serializable
- Direct Known Subclasses:
- Grayscale, HeatMap, LinearGradient, RainbowColors
public abstract class ScaledContinuousColorMapper extends ContinuousColorMapper
An abstract base class for implementations ofContinuousColorMapperthat allow to apply a a scaling factor to the values passed toContinuousColorMapper.get(double).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.erichseifert.gral.plots.colors.ColorMapper
ColorMapper.Mode
-
-
Constructor Summary
Constructors Constructor and Description ScaledContinuousColorMapper()Default constructor that initializes a new instance with a default offset of 0.0 and a scale of 1.0.ScaledContinuousColorMapper(double offset, double scale)Constructor that initializes a new instance with a specified offset and scaling factor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)doublegetOffset()Returns the current offset value.doublegetScale()Returns the current scaling factor.inthashCode()voidsetOffset(double offset)Sets a new offset value.voidsetRange(double start, double end)Sets offset and scale based on start and end values.voidsetScale(double scale)Sets a new scaling factor for passed values.-
Methods inherited from class de.erichseifert.gral.plots.colors.ContinuousColorMapper
get, get
-
Methods inherited from class de.erichseifert.gral.plots.colors.AbstractColorMapper
getMode
-
-
-
-
Constructor Detail
-
ScaledContinuousColorMapper
public ScaledContinuousColorMapper()
Default constructor that initializes a new instance with a default offset of 0.0 and a scale of 1.0.
-
ScaledContinuousColorMapper
public ScaledContinuousColorMapper(double offset, double scale)Constructor that initializes a new instance with a specified offset and scaling factor.- Parameters:
offset- Offset.scale- Scaling factor.
-
-
Method Detail
-
getOffset
public double getOffset()
Returns the current offset value.- Returns:
- Offset value.
-
setOffset
public void setOffset(double offset)
Sets a new offset value.- Parameters:
offset- Offset value.
-
getScale
public double getScale()
Returns the current scaling factor.- Returns:
- Scaling factor.
-
setScale
public void setScale(double scale)
Sets a new scaling factor for passed values.- Parameters:
scale- Scaling factor.
-
setRange
public void setRange(double start, double end)Sets offset and scale based on start and end values.- Parameters:
start- Start value.end- End value.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG