|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.DataValue.UtilityFactory
public static class DataValue.UtilityFactory
Implementation of the meta information to a DataValue
.
DataValue
implementations with customized meta information
must provide a static final member called UTILTIY
of this
class.
Constructor Summary | |
---|---|
protected |
DataValue.UtilityFactory()
Only subclasses are allowed to instantiate this class. |
Method Summary | |
---|---|
protected DataValueComparator |
getComparator()
Derived classes should override this and provide a DataValueComparator that
compares the respective DataValue . |
Icon |
getIcon()
Get an icon representing this value. |
protected DataValueRendererFamily |
getRendererFamily(DataColumnSpec spec)
Returns a family of all renderers this type natively supports. |
protected static Icon |
loadIcon(Class<?> className,
String path)
Convenience method to allow subclasses to load their icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DataValue.UtilityFactory()
Method Detail |
---|
public Icon getIcon()
It is recommended to override this method and return an appropriate icon of size 16x16px.
protected DataValueRendererFamily getRendererFamily(DataColumnSpec spec)
Views that rely on renderer implementations will get a list of all
available renderers by invoking
DataType.getRenderer(DataColumnSpec)
on the column's
DataType
which makes sure that all renderer implementations of compatible
values are returned.
spec
- the DataColumnSpec
of the
column for which the renderers are
used. Most of the renderer implementations won't need
column domain information but some do. For instance a
class that renders the double value in the column
according to the min/max values in the column domain.
null
protected DataValueComparator getComparator()
DataValueComparator
that
compares the respective DataValue
. If null
is returned the cell implementing the DataValue
interface is said to be not comparable with respect to this
DataValue
interface. If none of the implemented
DataValue
interfaces is comparable, the fallback
comparator based on the cell's toString()
method is
used.
null
protected static Icon loadIcon(Class<?> className, String path)
path
. This method will
not throw an exception when the loading fails but instead return a
null
icon.
className
- The class object, from which to retrieve the
package
, e.g. FooValue.class
.path
- The icon path relative to package associated with the
class argument.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |