webwork.view.taglib.ui.table.renderer
Class AbstractCellRenderer
java.lang.Object
webwork.view.taglib.ui.table.renderer.AbstractCellRenderer
- All Implemented Interfaces:
- CellRenderer
- Direct Known Subclasses:
- BooleanCellRenderer, DateCellRenderer, DefaultCellRenderer, FixedTextCellRenderer, LinkCellRenderer, NumericCellRenderer
- public abstract class AbstractCellRenderer
- extends java.lang.Object
- implements CellRenderer
this is the base class that most renderers will be derived from.
It allows setting the alignment. Subclasses should set there actuall
content by implementing getCellValue
Field Summary |
protected java.lang.String |
_alignment
used for horizontal cell alignmnet |
Method Summary |
java.lang.String |
getAlignment()
|
protected abstract java.lang.String |
getCellValue(WebTable table,
java.lang.Object data,
int row,
int col)
this is the method that subclasses need to implement to set their value. |
protected boolean |
isAligned()
|
java.lang.String |
renderCell(WebTable table,
java.lang.Object data,
int row,
int col)
implememnts CellRenderer renderCell. |
void |
setAlignment(java.lang.String alignment)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_alignment
protected java.lang.String _alignment
- used for horizontal cell alignmnet
AbstractCellRenderer
public AbstractCellRenderer()
isAligned
protected boolean isAligned()
getAlignment
public java.lang.String getAlignment()
setAlignment
public void setAlignment(java.lang.String alignment)
renderCell
public java.lang.String renderCell(WebTable table,
java.lang.Object data,
int row,
int col)
- implememnts CellRenderer renderCell. It sets the alignment. gets the actual
data from getCellValue
- Specified by:
renderCell
in interface CellRenderer
getCellValue
protected abstract java.lang.String getCellValue(WebTable table,
java.lang.Object data,
int row,
int col)
- this is the method that subclasses need to implement to set their value.
they should not override renderCell unless they want to change the alignmnent
renderering
Copyright © 2001-2003 WebWork All Rights Reserved.