Home » struts-2.1.8.1-src » org.apache » struts2 » components » table » renderer » [javadoc | source]
org.apache.struts2.components.table.renderer
abstract public class: AbstractCellRenderer [javadoc | source]
java.lang.Object
   org.apache.struts2.components.table.renderer.AbstractCellRenderer

All Implemented Interfaces:
    CellRenderer

Direct Known Subclasses:
    DefaultCellRenderer, DateCellRenderer, BooleanCellRenderer, FixedTextCellRenderer, LinkCellRenderer, NumericCellRenderer

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  String _alignment    used for horizontal cell alignmnet 
Method from org.apache.struts2.components.table.renderer.AbstractCellRenderer Summary:
getAlignment,   getCellValue,   isAligned,   renderCell,   setAlignment
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.components.table.renderer.AbstractCellRenderer Detail:
 public String getAlignment() 
 abstract protected 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
 protected boolean isAligned() 
 public String renderCell(WebTable table,
    Object data,
    int row,
    int col) 
    implememnts CellRenderer renderCell. It sets the alignment. gets the actual data from getCellValue
 public  void setAlignment(String alignment)