com.opensymphony.webwork.components.table.renderer
Class AbstractCellRenderer
java.lang.Object
com.opensymphony.webwork.components.table.renderer.AbstractCellRenderer
- All Implemented Interfaces:
- CellRenderer
- Direct Known Subclasses:
- BooleanCellRenderer, DateCellRenderer, DefaultCellRenderer, FixedTextCellRenderer, LinkCellRenderer, NumericCellRenderer
public abstract class AbstractCellRenderer
- extends 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_alignment
protected String _alignment
- used for horizontal cell alignmnet
AbstractCellRenderer
public AbstractCellRenderer()
setAlignment
public void setAlignment(String alignment)
getAlignment
public String getAlignment()
renderCell
public String renderCell(WebTable table,
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
isAligned
protected boolean isAligned()
getCellValue
protected abstract String getCellValue(WebTable table,
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