to.etc.domui.component.tbl
Class SimpleRowRenderer<T>

java.lang.Object
  extended by to.etc.domui.component.tbl.AbstractRowRenderer<T>
      extended by to.etc.domui.component.tbl.SimpleRowRenderer<T>
All Implemented Interfaces:
IRowRenderer<T>
Direct Known Subclasses:
MultipleSelectionRowRenderer

public class SimpleRowRenderer<T>
extends AbstractRowRenderer<T>
implements IRowRenderer<T>

Renders rows from a datamodel; this tries to use the metadata for all parts not explicitly specified.

Author:
Frits Jalvingh Created on Jun 18, 2008

Field Summary
 
Fields inherited from class to.etc.domui.component.tbl.AbstractRowRenderer
m_columnList
 
Constructor Summary
SimpleRowRenderer(java.lang.Class<T> dataClass, ClassMetaModel cmm, java.lang.String... cols)
           
SimpleRowRenderer(java.lang.Class<T> dataClass, java.lang.String... cols)
          Create a renderer by handling the specified class and a list of properties off it.
 
Method Summary
protected  void addColumns(java.util.List<ExpandedDisplayProperty<?>> xdpl, int[] widths)
           
protected  int getTotalWidth()
           
protected  void initialize(java.util.List<ExpandedDisplayProperty<?>> xdpl)
          Initialize, using the genericized table column set.
protected  void initializeExplicitColumns(java.lang.String[] cols)
          This initializes the ColumnList by auto-decoding all required data from the class and the list of columns specified.
protected  void setTotalWidth(int w)
           
 
Methods inherited from class to.etc.domui.component.tbl.AbstractRowRenderer
beforeQuery, check, complete, 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
 
Methods inherited from interface to.etc.domui.component.tbl.IRowRenderer
beforeQuery, getRowClicked, renderHeader, renderRow
 

Constructor Detail

SimpleRowRenderer

public SimpleRowRenderer(@Nonnull
                         java.lang.Class<T> dataClass,
                         java.lang.String... cols)
Create a renderer by handling the specified class and a list of properties off it.

Parameters:
dataClass -
cols -

SimpleRowRenderer

public SimpleRowRenderer(@Nonnull
                         java.lang.Class<T> dataClass,
                         @Nonnull
                         ClassMetaModel cmm,
                         java.lang.String... cols)
Method Detail

initializeExplicitColumns

protected void initializeExplicitColumns(java.lang.String[] cols)
This initializes the ColumnList by auto-decoding all required data from the class and the list of columns specified. It uses metamodel info if present.

Parameters:
clz -
cols -

initialize

protected void initialize(java.util.List<ExpandedDisplayProperty<?>> xdpl)
Initialize, using the genericized table column set.

Parameters:
clz -
xdpl -

addColumns

protected void addColumns(java.util.List<ExpandedDisplayProperty<?>> xdpl,
                          int[] widths)

setTotalWidth

protected void setTotalWidth(int w)

getTotalWidth

protected int getTotalWidth()