|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.data.renderer.SetOfRendererFamilies
public class SetOfRendererFamilies
Container for DataValueRendererFamily that is by itself a
renderer family. This class is used in DataType when all
available native renderer are gathered and returned as
DataValueRendererFamily.
Note:This is a helper class that shouldn't be any useful for you.
| Field Summary |
|---|
| Fields inherited from interface org.knime.core.data.renderer.DataValueRenderer |
|---|
PROPERTY_PREFERRED_RENDERER |
| Constructor Summary | |
|---|---|
SetOfRendererFamilies(List<DataValueRendererFamily> fams)
Constructs a new set from a list of renderer families given in a list. |
|
| Method Summary | |
|---|---|
boolean |
accepts(DataColumnSpec spec)
Is this renderer instance able to render the content of the column given by spec. |
boolean |
accepts(String desc,
DataColumnSpec spec)
Is the renderer with the given description able to render the content of spec. |
String |
getDescription()
Get a description for this renderer implementation. |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
|
Dimension |
getPreferredSize()
Get the dimension which the renderer component will preferably occupy. |
Component |
getRendererComponent(Object val)
Get a component that visualizes a given object. |
String[] |
getRendererDescriptions()
Get a "unique" description for all renderer that are available in this family. |
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
|
void |
setActiveRenderer(String desc)
Set the currently active renderer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SetOfRendererFamilies(List<DataValueRendererFamily> fams)
fams - All renderer in a list (type DataValueRendererFamily)
IllegalArgumentException - If list is empty
NullPointerException - If argument is null
ClassCastException - If list contains unexpected classes.| Method Detail |
|---|
public String[] getRendererDescriptions()
getRendererDescriptions in interface DataValueRendererFamilypublic void setActiveRenderer(String desc)
getRendererDescription(). If it
is not this method won't do anything.
setActiveRenderer in interface DataValueRendererFamilydesc - The ID of the renderer to be used.public String getDescription()
getDescription in interface DataValueRendererpublic Dimension getPreferredSize()
getPreferredSize in interface DataValueRenderer
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
getTableCellRendererComponent in interface TableCellRenderer
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
getListCellRendererComponent in interface ListCellRendererpublic Component getRendererComponent(Object val)
DataCell implementing the underlying
DataValue interface. The implementation, however, needs to
handle other cases as well, such as null arguments,
missing DataCell or generic objects.
getRendererComponent in interface DataValueRendererval - The value to render
val.
public boolean accepts(String desc,
DataColumnSpec spec)
spec.
accepts in interface DataValueRendererFamilydesc - The description of the renderer.spec - The column spec to check.
DataValueRenderer.accepts(DataColumnSpec)public boolean accepts(DataColumnSpec spec)
spec. Most implementations will return
true here but some may require some properties to be
set, for instance a molecule renderer needs to have 2D coordinates
in the column.
Note: This method is not used to test whether arbitrary types can be renderer by this renderer instance but rather if the specific runtime column spec (containing the type) is appropriate, for instance contains domain information or certain properties are set.
accepts in interface DataValueRendererspec - The column spec to check.
true if this renderer can be chosen to render
the content of the column.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||