|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.property.ColorModelRange
public final class ColorModelRange
Computes colors based on a range of minimum and maximum values assigned to certain colors which are interpolated between a min and maximum color.
Constructor Summary | |
---|---|
ColorModelRange(double lower,
Color min,
double upper,
Color max)
Creates new ColorHandler based on a mapping. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
ColorAttr |
getColorAttr(DataCell dc)
Returns a ColorAttr for the given DataCell value, or ColorAttr.DEFAULT if not set. |
Color |
getMaxColor()
|
double |
getMaxValue()
|
Color |
getMinColor()
|
double |
getMinValue()
|
int |
hashCode()
|
static ColorModelRange |
load(ConfigRO config)
Load color settings from Config including lower and upper bound, and min and max colors. |
void |
save(ConfigWO config)
Save lower and upper, and min and max colors to the given Config. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColorModelRange(double lower, Color min, double upper, Color max)
lower
- Lower bound.min
- Color of lower bound.upper
- Upper bound.max
- Color of upper bound.
IllegalArgumentException
- If lower is greater or equal upper
bound, or min or max is null
.Method Detail |
---|
public ColorAttr getColorAttr(DataCell dc)
ColorAttr.DEFAULT
if not set. The colors red, green, and
blue are merged in the same ratio from the original spread of the lower
and upper bounds.
getColorAttr
in interface ColorHandler.ColorModel
dc
- A DataCell value to get color for.
public double getMinValue()
public Color getMinColor()
public double getMaxValue()
public Color getMaxColor()
public void save(ConfigWO config)
save
in interface ColorHandler.ColorModel
config
- to save settings to.#save(ConfigWO)
public static ColorModelRange load(ConfigRO config) throws InvalidSettingsException
config
- Read settings from.
ColorModelRange
object.
InvalidSettingsException
- If the settings could not be read.public String toString()
toString
in class Object
Object.toString()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |