to.etc.domui.component.tbl
Class BasicRowRenderer<T>
java.lang.Object
to.etc.domui.component.tbl.AbstractRowRenderer<T>
to.etc.domui.component.tbl.BasicRowRenderer<T>
- All Implemented Interfaces:
- IRowRenderer<T>
public class BasicRowRenderer<T>
- extends AbstractRowRenderer<T>
- implements IRowRenderer<T>
Highly customizable RowRenderer. This has many ways to customize the row output, often using
metadata. The definition for this renderer can be set until it's first use; it's actual definition
gets calculated at the time it's first used.
The possible specifications used in property modifiers are:
- "%28": a String starting with % denotes a width in percents. %28 gets translated to setWidth("28%");
- "^Title": a String starting with ^ denotes the header caption to use. Use ^~key to internationalize.
- "$cssclass": a String denoting a CSS class.
- Class<? extends IConverter>: the converter to use to convert the value to a string
- IConverter: an instance of a converter
- Class<? extends INodeContentRenderer<T>>: the class to use to render the content of the column.
- INodeContentRenderer<T>: an instance of a node renderer to use to render the content of the column.
- BasicRowRenderer.NOWRAP: forces a 'nowrap' on the column
- Author:
- Frits Jalvingh
Created on Jun 18, 2008
Field Summary |
static java.lang.String |
NOWRAP
|
Constructor Summary |
BasicRowRenderer(java.lang.Class<T> dataClass,
ClassMetaModel cmm,
java.lang.Object... cols)
|
BasicRowRenderer(java.lang.Class<T> dataClass,
java.lang.Object... cols)
Create a renderer by handling the specified class and a list of properties off it. |
Method Summary |
|
addColumns(java.lang.Object... cols)
Add the specified list of property names and presentation options to the column definitions. |
void |
addDefaultColumns()
Add all of the columns as defined by the metadata to the list. |
protected void |
complete(TableModelTableBase<T> tbl)
Complete this object if it is not already complete. |
Methods inherited from class to.etc.domui.component.tbl.AbstractRowRenderer |
beforeQuery, check, getActualClass, getCellClicked, getColumn, getColumnByName, getColumnCount, getNodeRenderer, getRowButtonFactory, getRowClicked, getSortColumn, getUnknownColumnCaption, isComplete, model, renderColumn, renderHeader, renderRow, setCellClicked, setColumnWidth, setColumnWidths, setNodeRenderer, setRowButtonFactory, setRowClicked, setSortColumn, setUnknownColumnCaption |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOWRAP
public static final java.lang.String NOWRAP
- See Also:
- Constant Field Values
BasicRowRenderer
public BasicRowRenderer(@Nonnull
java.lang.Class<T> dataClass,
java.lang.Object... cols)
throws java.lang.Exception
- Create a renderer by handling the specified class and a list of properties off it.
- Parameters:
dataClass
- cols
-
- Throws:
java.lang.Exception
BasicRowRenderer
public BasicRowRenderer(@Nonnull
java.lang.Class<T> dataClass,
@Nonnull
ClassMetaModel cmm,
java.lang.Object... cols)
throws java.lang.Exception
- Throws:
java.lang.Exception
addColumns
public <R> BasicRowRenderer<T> addColumns(java.lang.Object... cols)
throws java.lang.Exception
- Add the specified list of property names and presentation options to the column definitions. The items passed in the
columns object can be multiple property definitions followed by specifications. A property name is a string starting
with a letter always. All other Strings and objects are treated as specifications for display. The possible specifications
are:
- "%28": a String starting with % denotes a width in percents. %28 gets translated to setWidth("28%");
- "^Title": a String starting with ^ denotes the header caption to use. Use ^~key~ to internationalize.
- "$cssclass": a String denoting a CSS class.
- Class<? extends IConverter>: the converter to use to convert the value to a string
- IConverter: an instance of a converter
- Class<? extends INodeContentRenderer<T>>: the class to use to render the content of the column.
- INodeContentRenderer<T>: an instance of a node renderer to use to render the content of the column.
- BasicRowRenderer.NOWRAP: forces a 'nowrap' on the column
- Parameters:
clz
- cols
- , R extends INodeContentRenderer>
- Throws:
java.lang.Exception
addDefaultColumns
public void addDefaultColumns()
- Add all of the columns as defined by the metadata to the list.
complete
protected void complete(TableModelTableBase<T> tbl)
- Complete this object if it is not already complete.
- Overrides:
complete
in class AbstractRowRenderer<T>