org.apache.beehive.netui.databinding.datagrid.model
Class ColumnModel

Object
  extended by ColumnModel
Direct Known Subclasses:
AbstractHtmlColumnModel

public abstract class ColumnModel
extends Object

todo: re-enable sorting / filtering in column headers


Field Summary
static int ATTR_GENERAL
           
static int ATTR_GENERAL_EXPRESSION
           
static int DATA_RENDER_STATE
           
static int HEADER_RENDER_STATE
           
static int NO_RENDER_STATE
           
 
Constructor Summary
ColumnModel()
           
 
Method Summary
 void addFormatter(FormatTag.Formatter formatter)
           
 void closeDataCell(StringBuffer buf)
           
 void closeHeaderCell(StringBuffer buf)
           
protected  String createResourceUri(String resourceName)
           
 void endCell()
           
protected  String formatText(Object text)
           
 DataGridModel getDataGridModel()
           
 String getFilterExpression()
           
 String getFilterUri()
           
 String getHeaderText()
           
 int getRenderState()
           
 String getSortExpression()
           
 String getSortUri()
           
 Boolean isFilterable()
           
 boolean isRenderingData()
           
 boolean isRenderingHeader()
           
 Boolean isSortable()
           
 void openDataCell(StringBuffer buf)
           
 void openHeaderCell(StringBuffer buf)
           
abstract  void renderDataCell(StringBuffer buffer)
           
protected  void renderEmptyCell(StringBuffer buffer)
           
 void renderHeader(StringBuffer buffer)
           
 void setDataGridModel(DataGridModel tableModel)
           
 void setFilterable(Boolean filterable)
           
 void setFilterExpression(String filterExpression)
           
 void setFilterUri(String filterUri)
           
 void setHeaderText(String headerText)
           
protected  String setNonEmptyValueAttribute(String attrValue)
          Filter out the empty string value and return either the value or null.
 void setRenderState(int renderState)
           
 void setSortable(Boolean sortable)
           
 void setSortExpression(String sortExpression)
           
 void setSortUri(String sortUri)
           
 void startCell()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_RENDER_STATE

public static final int DATA_RENDER_STATE
See Also:
Constant Field Values

HEADER_RENDER_STATE

public static final int HEADER_RENDER_STATE
See Also:
Constant Field Values

NO_RENDER_STATE

public static final int NO_RENDER_STATE
See Also:
Constant Field Values

ATTR_GENERAL

public static final int ATTR_GENERAL
See Also:
Constant Field Values

ATTR_GENERAL_EXPRESSION

public static final int ATTR_GENERAL_EXPRESSION
See Also:
Constant Field Values
Constructor Detail

ColumnModel

public ColumnModel()
Method Detail

setRenderState

public void setRenderState(int renderState)

getRenderState

public int getRenderState()

isRenderingHeader

public boolean isRenderingHeader()

isRenderingData

public boolean isRenderingData()

setDataGridModel

public void setDataGridModel(DataGridModel tableModel)

getDataGridModel

public DataGridModel getDataGridModel()

getSortExpression

public String getSortExpression()

setSortExpression

public void setSortExpression(String sortExpression)

getFilterExpression

public String getFilterExpression()

setFilterExpression

public void setFilterExpression(String filterExpression)

getHeaderText

public String getHeaderText()

setHeaderText

public void setHeaderText(String headerText)

isFilterable

public Boolean isFilterable()

setFilterable

public void setFilterable(Boolean filterable)

isSortable

public Boolean isSortable()

setSortable

public void setSortable(Boolean sortable)

setSortUri

public void setSortUri(String sortUri)

getSortUri

public String getSortUri()

setFilterUri

public void setFilterUri(String filterUri)

getFilterUri

public String getFilterUri()

addFormatter

public void addFormatter(FormatTag.Formatter formatter)

startCell

public void startCell()

endCell

public void endCell()

renderHeader

public void renderHeader(StringBuffer buffer)

renderDataCell

public abstract void renderDataCell(StringBuffer buffer)

openHeaderCell

public void openHeaderCell(StringBuffer buf)

closeHeaderCell

public void closeHeaderCell(StringBuffer buf)

openDataCell

public void openDataCell(StringBuffer buf)

closeDataCell

public void closeDataCell(StringBuffer buf)

renderEmptyCell

protected void renderEmptyCell(StringBuffer buffer)

createResourceUri

protected String createResourceUri(String resourceName)

formatText

protected String formatText(Object text)

setNonEmptyValueAttribute

protected final String setNonEmptyValueAttribute(String attrValue)
Filter out the empty string value and return either the value or null. When the value of attrValue is equal to the empty string this will return null, otherwise it will return the value of attrValue.

Parameters:
attrValue - This is the value we will check for the empty string.
Returns:
either the value of attrValue or null