to.etc.domui.component.tbl
Class DataCellTable

java.lang.Object
  extended by to.etc.domui.dom.css.CssBase
      extended by to.etc.domui.dom.html.NodeBase
          extended by to.etc.domui.dom.html.NodeContainer
              extended by to.etc.domui.dom.html.Div
                  extended by to.etc.domui.component.tbl.TableModelTableBase<T>
                      extended by to.etc.domui.component.tbl.TabularComponentBase<java.lang.Object>
                          extended by to.etc.domui.component.tbl.DataCellTable
All Implemented Interfaces:
java.lang.Iterable<NodeBase>, IModelBinding, ITableModelListener<java.lang.Object>, INodeErrorDelegate, IDraggable, IDropTargetable

public class DataCellTable
extends TabularComponentBase<java.lang.Object>

A table-related component which shows all "rows" in a single cell instead of in a table. This results in an w x h grid where each cell in the grid contains a single data item. Example is a photo album's index page. FIXME Needs to be generic?

Author:
Frits Jalvingh Created on Oct 13, 2008

Field Summary
 
Fields inherited from class to.etc.domui.component.tbl.TabularComponentBase
m_eix, m_six
 
Constructor Summary
DataCellTable(ITableModel<java.lang.Object> model)
           
 
Method Summary
 void createContent()
           
 int getColumns()
           
 INodeContentRenderer<?> getContentRenderer()
           
 java.lang.Class<? extends INodeContentRenderer<?>> getContentRendererClass()
           
 int getRows()
           
 boolean isRenderEmptyCells()
           
 boolean isRenderEmptyRows()
           
 void modelChanged(ITableModel<java.lang.Object> model)
          Called when the entire content of the model changed.
 void rowAdded(ITableModel<java.lang.Object> model, int index, java.lang.Object value)
          Called after a row is added to the model.
 void rowDeleted(ITableModel<java.lang.Object> model, int index, java.lang.Object value)
          Called after a row has been deleted.
 void rowModified(ITableModel<java.lang.Object> model, int index, java.lang.Object value)
          Called after a row has been changed.
 void setColumns(int columns)
           
 void setContentRenderer(INodeContentRenderer<?> contentRenderer)
           
 void setContentRendererClass(java.lang.Class<? extends INodeContentRenderer<?>> contentRendererClass)
           
 void setRenderEmptyCells(boolean renderEmptyCells)
          When set to T, empty cells (cells that have no data content, usually present at the end of the table in the last row) will be rendered by calling the INodeContentRenderer with a null object value.
 void setRenderEmptyRows(boolean renderEmptyRows)
           
 void setRows(int rows)
           
 
Methods inherited from class to.etc.domui.component.tbl.TabularComponentBase
addChangeListener, calcIndices, fireModelChanged, firePageChanged, getCurrentPage, getPageCount, getPageItems, getTruncatedCount, removeChangeListener, setCurrentPage
 
Methods inherited from class to.etc.domui.component.tbl.TableModelTableBase
getModel, getModelItem, onRefresh, onShelve, onUnshelve, setModel
 
Methods inherited from class to.etc.domui.dom.html.Div
afterCreateContent, componentHandleWebAction, fadeIn, fadeIn, fadeOut, getDragHandler, getDropBody, getDropHandler, getDropMode, getReturnPressed, setDragHandler, setDropBody, setDropHandler, setReturnPressed, slideDown, slideUp, tb, visit
 
Methods inherited from class to.etc.domui.dom.html.NodeContainer
add, add, add, addTable, canContain, delegateTo, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChild, getDeepChildren, getErrorFence, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalGetOldChildren, internalShelve, internalUnshelve, iterator, moveControlToModel, moveModelToControl, removeAllChildren, removeChild, removeChild, replaceChild, setControlsEnabled, setErrorFence, setErrorFence, setText, setValue
 
Methods inherited from class to.etc.domui.dom.html.NodeBase
$, acceptRequestParameter, addCssClass, addGlobalMessage, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, build, changed, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, findComponentBundle, getActualID, getClicked, getComponentBundle, getCreateJS, getCssClass, getErrorDelegate, getErrorLocation, getMessage, getOnClickJS, getOnMouseDownJS, getPage, getParent, getParent, getParent, getSharedContext, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTitle, getUserObject, handleDrop, hasCssClass, hasError, internalGetOldParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetTag, isBuilt, isFocusRequested, onAddedToPage, onBeforeFullRender, onForceRebuild, onHeaderContributors, onRemoveFromPage, refresh, remove, removeCssClass, renderJavascriptState, replaceWith, setClicked, setComponentBundle, setCssClass, setErrorDelegate, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setSpecialAttribute, setTestID, setTitle, setUserObject, stretchHeight, toString
 
Methods inherited from class to.etc.domui.dom.css.CssBase
getBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataCellTable

public DataCellTable(ITableModel<java.lang.Object> model)
Method Detail

getRows

public int getRows()

setRows

public void setRows(int rows)

getColumns

public int getColumns()

setColumns

public void setColumns(int columns)

isRenderEmptyCells

public boolean isRenderEmptyCells()

setRenderEmptyCells

public void setRenderEmptyCells(boolean renderEmptyCells)
When set to T, empty cells (cells that have no data content, usually present at the end of the table in the last row) will be rendered by calling the INodeContentRenderer with a null object value. The default is to simply render empty (invisible) cells for the missing data items.

Parameters:
renderEmptyCells -

getContentRenderer

public INodeContentRenderer<?> getContentRenderer()

setContentRenderer

public void setContentRenderer(INodeContentRenderer<?> contentRenderer)

getContentRendererClass

public java.lang.Class<? extends INodeContentRenderer<?>> getContentRendererClass()

setContentRendererClass

public void setContentRendererClass(java.lang.Class<? extends INodeContentRenderer<?>> contentRendererClass)

isRenderEmptyRows

public boolean isRenderEmptyRows()

setRenderEmptyRows

public void setRenderEmptyRows(boolean renderEmptyRows)

createContent

public void createContent()
                   throws java.lang.Exception
Overrides:
createContent in class NodeBase
Throws:
java.lang.Exception
See Also:
NodeBase.createContent()

modelChanged

public void modelChanged(ITableModel<java.lang.Object> model)
Description copied from interface: ITableModelListener
Called when the entire content of the model changed. This should indicate a complete content redraw usually.

See Also:
ITableModelListener.modelChanged(to.etc.domui.component.tbl.ITableModel)

rowAdded

public void rowAdded(ITableModel<java.lang.Object> model,
                     int index,
                     java.lang.Object value)
              throws java.lang.Exception
Description copied from interface: ITableModelListener
Called after a row is added to the model.

Throws:
java.lang.Exception

rowDeleted

public void rowDeleted(ITableModel<java.lang.Object> model,
                       int index,
                       java.lang.Object value)
                throws java.lang.Exception
Description copied from interface: ITableModelListener
Called after a row has been deleted.

index - The index of the deleted row in the table.
value - The deleted value.
Throws:
java.lang.Exception

rowModified

public void rowModified(ITableModel<java.lang.Object> model,
                        int index,
                        java.lang.Object value)
                 throws java.lang.Exception
Description copied from interface: ITableModelListener
Called after a row has been changed.

Throws:
java.lang.Exception