org.apache.beehive.netui.tags.databinding.base.style
Class AbstractStyleBean

Object
  extended by AbstractStyleBean
Direct Known Subclasses:
CellRepeaterStyleBean

public abstract class AbstractStyleBean
extends Object

An abstract JavaBean that contains basic style information about an HTML table. This bean supports table and row level style class attributes. This JavaBean can be extended to add additional style information.

Two basic methods are provided for rendering table and row styles into a StringBuilder.


Constructor Summary
AbstractStyleBean()
           
 
Method Summary
 String getRowClass()
          Get the table row style class.
 String getTableClass()
          Get the table style class.
 String renderRowStyle()
          A method that will render the style class into the StringBuilder.
protected  String renderStyle(String style)
          Render the style class into the StringBuilder.
 String renderTableStyle()
          A method that will render the style class into the StringBuilder.
 void setRowClass(String rowClass)
          Set the table row style class.
 void setTableClass(String tableClass)
          Set the table style class.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStyleBean

public AbstractStyleBean()
Method Detail

setTableClass

public void setTableClass(String tableClass)
Set the table style class.

Parameters:
tableClass - the table style class

getTableClass

public String getTableClass()
Get the table style class.

Returns:
the row style class or null if none is set

setRowClass

public void setRowClass(String rowClass)
Set the table row style class.

Parameters:
rowClass - the table row style class

getRowClass

public String getRowClass()
Get the table row style class.

Returns:
the row style class or null if none is set

renderTableStyle

public String renderTableStyle()
A method that will render the style class into the StringBuilder.


renderRowStyle

public String renderRowStyle()
A method that will render the style class into the StringBuilder.


renderStyle

protected String renderStyle(String style)
Render the style class into the StringBuilder. If the style class style is not null, it is appended into the StringBuilder with the HTML tag attribute "class". A space is inserted at the front of the attribute but not at the end, so a style value of "foo" will render as:
     ' class="foo"'
 

Parameters:
style - the value of the style class