|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.data.property.ColorModelNominal
public final class ColorModelNominal
Color model which maps a set of DataCell objects to
Color.
| Constructor Summary | |
|---|---|
ColorModelNominal(Map<DataCell,ColorAttr> map)
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. |
int |
hashCode()
|
Iterator<DataCell> |
iterator()
Returns an iterator over the keys. |
static ColorModelNominal |
load(ConfigRO config)
Read color settings from given Config and returns a new
ColorModelNominal object. |
String |
printColorMapping()
|
void |
save(ConfigWO config)
Saves the DataCell to Color mapping to the
given Config. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ColorModelNominal(Map<DataCell,ColorAttr> map)
map - Mapping form DataCell values to ColorAttr objects.
IllegalArgumentException - If the map is null.| Method Detail |
|---|
public ColorAttr getColorAttr(DataCell dc)
ColorAttr.DEFAULT if not set.
getColorAttr in interface ColorHandler.ColorModeldc - A DataCell value to get color for.
public Iterator<DataCell> iterator()
iterator in interface Iterable<DataCell>Iterable.iterator()public void save(ConfigWO config)
DataCell to Color mapping to the
given Config. The color is split into red, green, blue, and
alpha component which are stored as int array.
save in interface ColorHandler.ColorModelconfig - Save settings to.
NullPointerException - If the config is null.#save(ConfigWO)
public static ColorModelNominal load(ConfigRO config)
throws InvalidSettingsException
Config and returns a new
ColorModelNominal object.
config - Reads color model from.
ColorModelNominal object.
InvalidSettingsException - If the color model settings could not
be read.
NullPointerException - If the config is null.public String printColorMapping()
ColorModel as list of
DataCell to Color mapping.public String toString()
toString in class ObjectObject.toString()public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||