public interface DataValueRendererFamily extends DataValueRenderer
DataValueRenderer
s which can be
used to render one particular kind of
DataValue
. This interface itself extends
DataValueRenderer
, thus it can be
used in lists, tables and such. Among the renderer in this container there is
always one active one which will be used to delegate request to.
Classes implementing this interface can instantiate different kind of
DataValueRenderer
. The number of
different renderers is defined by the number of different descriptions
returned by the getRendererDescriptions()
method. Which renderer is
actually used (i.e. active) is defined by the
setActiveRenderer(String)
method.
There is description assigned to each of the available renderers. This string can be used in menus and so on to give a choice of the different renderer available.
Refer to the package description to
see how to couple a DataValueRendererFamily
with a
DataValue
implementation.
DataValue
,
DataValueRenderer
PROPERTY_PREFERRED_RENDERER
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(String desc,
DataColumnSpec spec)
Is the renderer with the given description able to render the
content of
spec . |
String[] |
getRendererDescriptions()
Get a "unique" description for all renderer that are available in this
family.
|
void |
setActiveRenderer(String description)
Set the currently active renderer.
|
accepts, getDescription, getPreferredSize, getRendererComponent
getTableCellRendererComponent
getListCellRendererComponent
String[] getRendererDescriptions()
void setActiveRenderer(String description)
getRendererDescription()
. If it
is not this method won't do anything.description
- The ID of the renderer to be used.boolean accepts(String desc, DataColumnSpec spec)
spec
.desc
- The description of the renderer.spec
- The column spec to check.IllegalArgumentException
- If the description is unknown.DataValueRenderer.accepts(DataColumnSpec)
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.