|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.property.ColorHandler
public final class ColorHandler
Final ColorHandler
implementation as container which forwards
color requests for a DataCell
to its underlying
ColorHandler.ColorModel
.
The ColorModel
can be loaded and saved
from Config
object.
Nested Class Summary | |
---|---|
(package private) static interface |
ColorHandler.ColorModel
Interface allowing requests for ColorAttr by DataCell . |
Constructor Summary | |
---|---|
ColorHandler(ColorHandler.ColorModel model)
Create new color handler with the given ColorModel . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
ColorAttr |
getColorAttr(DataCell dc)
Returns a ColorAttr object as specified by the content
of the given DataCell . |
int |
hashCode()
|
static ColorHandler |
load(ConfigRO config)
Reads the color model settings from the given Config , inits
a new ColorModel , and returns a new
ColorHandler . |
void |
save(ConfigWO config)
Saves the underlying ColorModel to the given
Config by adding the ColorModel class as
String and calling
ColorHandler.ColorModel.save(ConfigWO) within the model. |
String |
toString()
Returns a String summary of the underlying ColorHandler.ColorModel . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColorHandler(ColorHandler.ColorModel model)
ColorModel
.
model
- the color model which has the color settings
IllegalArgumentException
- if the model is null
Method Detail |
---|
public ColorAttr getColorAttr(DataCell dc)
ColorAttr
object as specified by the content
of the given DataCell
. Requests are forwarded to the
underlying ColorModel
. If no ColorAttr
is assigned to the given dc
, this method returns the
ColorAttr.DEFAULT
as default color, but never null
.
dc
- DataCell
used to generate color
ColorAttr
object assigned to the given cellColorAttr.DEFAULT
public void save(ConfigWO config)
ColorModel
to the given
Config
by adding the ColorModel
class as
String and calling
ColorHandler.ColorModel.save(ConfigWO)
within the model.
config
- color settings are saved to
NullPointerException
- if the config is null
public static ColorHandler load(ConfigRO config) throws InvalidSettingsException
Config
, inits
a new ColorModel
, and returns a new
ColorHandler
.
config
- read color settings from
ColorHandler
object created with the color
model settings read from config
InvalidSettingsException
- if either the class or color model
settings could not be read
NullPointerException
- if the config
is
null
public String toString()
ColorHandler.ColorModel
.
toString
in class Object
ColorModel
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 |