org.apache.struts2.components.table.renderer
Class FixedTextCellRenderer

java.lang.Object
  extended by org.apache.struts2.components.table.renderer.AbstractCellRenderer
      extended by org.apache.struts2.components.table.renderer.FixedTextCellRenderer
All Implemented Interfaces:
CellRenderer

public class FixedTextCellRenderer
extends AbstractCellRenderer

usefull if a column has an embeded ID number needed for a link but you want it to say something else.


Field Summary
protected  String _text
          this is the text that will be shown in the column
 
Fields inherited from class org.apache.struts2.components.table.renderer.AbstractCellRenderer
_alignment
 
Constructor Summary
FixedTextCellRenderer()
           
 
Method Summary
 String getCellValue(WebTable table, Object data, int row, int col)
          this is the method that subclasses need to implement to set their value.
 String getText()
           
 void setText(String text)
           
 
Methods inherited from class org.apache.struts2.components.table.renderer.AbstractCellRenderer
getAlignment, isAligned, renderCell, setAlignment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_text

protected String _text
this is the text that will be shown in the column

Constructor Detail

FixedTextCellRenderer

public FixedTextCellRenderer()
Method Detail

getCellValue

public String getCellValue(WebTable table,
                           Object data,
                           int row,
                           int col)
Description copied from class: AbstractCellRenderer
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

Specified by:
getCellValue in class AbstractCellRenderer

setText

public void setText(String text)

getText

public String getText()


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.