org.salespointframework.web.html.viewrepresentations
Class NativeHtmlCssTable

java.lang.Object
  extended by org.salespointframework.web.html.viewrepresentations.DefaultHtmlViewRepresentation
      extended by org.salespointframework.web.html.viewrepresentations.NativeHtmlCssTable
All Implemented Interfaces:
HtmlViewRepresentation

public class NativeHtmlCssTable
extends DefaultHtmlViewRepresentation

Declares a table in devisions and CSS.
It's using by View.

Author:
Uwe Schmidt, Lars Kreisz

Field Summary
private  int rowCounter
           
private  GenericHtmlTag tag
           
private  boolean zebraStyle
           
 
Fields inherited from class org.salespointframework.web.html.viewrepresentations.DefaultHtmlViewRepresentation
summary
 
Constructor Summary
NativeHtmlCssTable(boolean zebraStyle)
          Default is 'false'.
 
Method Summary
 java.lang.String getCaption(java.lang.String style, java.lang.String styleName)
          Return String: <div style="display:table-caption;" class="table-caption" ...>
 java.lang.String getCaptioneEnd()
          Return String: </div>
 java.lang.String getCellEnd()
          Return String: </div>
 java.lang.String getCellStart(java.lang.String styleName)
          Return String: <div style="display:table-cell;" class="table-cell" ...>
 java.lang.String getCol(java.lang.String width, java.lang.String span)
          Return String: <div style="display:table-column;" class="table-column" ...>
 java.lang.String getColEnd()
          Return String: </div>
 java.lang.String getColGroup(java.lang.String width, java.lang.String span)
          Return String: <div style="display:table-columns-group;" class="table-columns-group" ...>
 java.lang.String getColGroupEnd()
          Return String: </div>
 java.lang.String getColXHtml(java.lang.String width, java.lang.String span)
          Return String: <div style="display:table-columns-group;" class="table-columns-group" ... />
 java.lang.String getEnd()
          Return String: </div>
 java.lang.String getHeadEnd()
          Return String: </div>
 java.lang.String getHeadStart(java.lang.String styleName)
          Return String: <div style="display:table-cell;" class="table-cell" ...>
 java.lang.String getRowEnd()
          Return String: </div>
 java.lang.String getRowStart()
          Return String: <div style="display:table-row;" class="table-row ..." ...>
 java.lang.String getStart(java.lang.String id, java.lang.String styleName, java.lang.String style)
          Return String: <div style="display:table;" class="table" ...>
 java.lang.String getTBody(java.lang.String style, java.lang.String styleName)
          Return String: <div style="display:table-row-group;" class="table-row-group" ...>
 java.lang.String getTBodyEnd()
          Return String: </div>
 java.lang.String getTFoot(java.lang.String style, java.lang.String styleName)
          Return String: <div style="display:table-footer-group;" class="table-footer-group" ...>
 java.lang.String getTFootEnd()
          Return String: </div>
 java.lang.String getTHead(java.lang.String style, java.lang.String styleName)
          Return String: <div style="display:table-header-group;" class="table-header-group" ...>
 java.lang.String getTHeadEnd()
          Return String: </div>
 boolean hasBody()
          A CSS-table has a body.
 boolean hasCaption()
          A CSS-table has a caption.
 boolean hasFooter()
          A CSS-table has a footer.
 boolean hasHeader()
          A CSS-table has a header.
 
Methods inherited from class org.salespointframework.web.html.viewrepresentations.DefaultHtmlViewRepresentation
hasSummary, setSummary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rowCounter

private int rowCounter

zebraStyle

private boolean zebraStyle

tag

private GenericHtmlTag tag
Constructor Detail

NativeHtmlCssTable

public NativeHtmlCssTable(boolean zebraStyle)
Default is 'false'. If 'true' it change the class-attribute between 'table-row-even' and 'table-row-odd'.

Parameters:
zebraStyle -
Method Detail

hasHeader

public boolean hasHeader()
A CSS-table has a header.

Specified by:
hasHeader in interface HtmlViewRepresentation
Overrides:
hasHeader in class DefaultHtmlViewRepresentation

hasBody

public boolean hasBody()
A CSS-table has a body.

Specified by:
hasBody in interface HtmlViewRepresentation
Overrides:
hasBody in class DefaultHtmlViewRepresentation

hasFooter

public boolean hasFooter()
A CSS-table has a footer.

Specified by:
hasFooter in interface HtmlViewRepresentation
Overrides:
hasFooter in class DefaultHtmlViewRepresentation

hasCaption

public boolean hasCaption()
A CSS-table has a caption.

Specified by:
hasCaption in interface HtmlViewRepresentation
Overrides:
hasCaption in class DefaultHtmlViewRepresentation

getStart

public java.lang.String getStart(java.lang.String id,
                                 java.lang.String styleName,
                                 java.lang.String style)
Return String: <div style="display:table;" class="table" ...>

Specified by:
getStart in interface HtmlViewRepresentation
Overrides:
getStart in class DefaultHtmlViewRepresentation
Parameters:
id - The value of the id-attribute of the rendered tag. Be sure it's unique for the whole HTML document.
styleName - The value of the class-attribute of the rendered tag.
style - The value of the style-attribute of the rendered tag.
Returns:
String of HTML-code

getEnd

public java.lang.String getEnd()
Return String: </div>

Specified by:
getEnd in interface HtmlViewRepresentation
Overrides:
getEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getHeadStart

public java.lang.String getHeadStart(java.lang.String styleName)
Return String: <div style="display:table-cell;" class="table-cell" ...>

Specified by:
getHeadStart in interface HtmlViewRepresentation
Overrides:
getHeadStart in class DefaultHtmlViewRepresentation
Parameters:
styleName - The value of the class-attribute of the rendered tag.
Returns:
String of HTML-code

getHeadEnd

public java.lang.String getHeadEnd()
Return String: </div>

Specified by:
getHeadEnd in interface HtmlViewRepresentation
Overrides:
getHeadEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getRowStart

public java.lang.String getRowStart()
Return String: <div style="display:table-row;" class="table-row ..." ...>

Specified by:
getRowStart in interface HtmlViewRepresentation
Overrides:
getRowStart in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getRowEnd

public java.lang.String getRowEnd()
Return String: </div>

Specified by:
getRowEnd in interface HtmlViewRepresentation
Overrides:
getRowEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getCellStart

public java.lang.String getCellStart(java.lang.String styleName)
Return String: <div style="display:table-cell;" class="table-cell" ...>

Specified by:
getCellStart in interface HtmlViewRepresentation
Overrides:
getCellStart in class DefaultHtmlViewRepresentation
Parameters:
styleName - The value of the class-attribute of the rendered tag.
Returns:
String of HTML-code

getCellEnd

public java.lang.String getCellEnd()
Return String: </div>

Specified by:
getCellEnd in interface HtmlViewRepresentation
Overrides:
getCellEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getCaption

public java.lang.String getCaption(java.lang.String style,
                                   java.lang.String styleName)
Return String: <div style="display:table-caption;" class="table-caption" ...>

Specified by:
getCaption in interface HtmlViewRepresentation
Overrides:
getCaption in class DefaultHtmlViewRepresentation
Parameters:
style - The value of the style-attribute of the rendered tag.
styleName - The value of the class-attribute of the rendered tag.
Returns:
String of HTML-code

getCaptioneEnd

public java.lang.String getCaptioneEnd()
Return String: </div>

Specified by:
getCaptioneEnd in interface HtmlViewRepresentation
Overrides:
getCaptioneEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getCol

public java.lang.String getCol(java.lang.String width,
                               java.lang.String span)
Return String: <div style="display:table-column;" class="table-column" ...>

Specified by:
getCol in interface HtmlViewRepresentation
Overrides:
getCol in class DefaultHtmlViewRepresentation
Parameters:
width - The value of the width-attribute of the rendered tag.
span - The value of the span-attribute of the rendered tag.
Returns:
String of HTML-code

getColEnd

public java.lang.String getColEnd()
Return String: </div>

Specified by:
getColEnd in interface HtmlViewRepresentation
Overrides:
getColEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getColGroup

public java.lang.String getColGroup(java.lang.String width,
                                    java.lang.String span)
Return String: <div style="display:table-columns-group;" class="table-columns-group" ...>

Specified by:
getColGroup in interface HtmlViewRepresentation
Overrides:
getColGroup in class DefaultHtmlViewRepresentation
Parameters:
width - The value of the width-attribute of the rendered tag.
span - The value of the span-attribute of the rendered tag.
Returns:
String of HTML-code

getColGroupEnd

public java.lang.String getColGroupEnd()
Return String: </div>

Specified by:
getColGroupEnd in interface HtmlViewRepresentation
Overrides:
getColGroupEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getColXHtml

public java.lang.String getColXHtml(java.lang.String width,
                                    java.lang.String span)
Return String: <div style="display:table-columns-group;" class="table-columns-group" ... />

Specified by:
getColXHtml in interface HtmlViewRepresentation
Overrides:
getColXHtml in class DefaultHtmlViewRepresentation
Parameters:
width - The value of the width-attribute of the rendered tag.
span - The value of the span-attribute of the rendered tag.
Returns:
String of HTML-code

getTBody

public java.lang.String getTBody(java.lang.String style,
                                 java.lang.String styleName)
Return String: <div style="display:table-row-group;" class="table-row-group" ...>

Specified by:
getTBody in interface HtmlViewRepresentation
Overrides:
getTBody in class DefaultHtmlViewRepresentation
Parameters:
style - The value of the style-attribute of the rendered tag.
styleName - The value of the class-attribute of the rendered tag.
Returns:
String of HTML-code

getTBodyEnd

public java.lang.String getTBodyEnd()
Return String: </div>

Specified by:
getTBodyEnd in interface HtmlViewRepresentation
Overrides:
getTBodyEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getTFoot

public java.lang.String getTFoot(java.lang.String style,
                                 java.lang.String styleName)
Return String: <div style="display:table-footer-group;" class="table-footer-group" ...>

Specified by:
getTFoot in interface HtmlViewRepresentation
Overrides:
getTFoot in class DefaultHtmlViewRepresentation
Parameters:
style - The value of the style-attribute of the rendered tag.
styleName - The value of the class-attribute of the rendered tag.
Returns:
String of HTML-code

getTFootEnd

public java.lang.String getTFootEnd()
Return String: </div>

Specified by:
getTFootEnd in interface HtmlViewRepresentation
Overrides:
getTFootEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code

getTHead

public java.lang.String getTHead(java.lang.String style,
                                 java.lang.String styleName)
Return String: <div style="display:table-header-group;" class="table-header-group" ...>

Specified by:
getTHead in interface HtmlViewRepresentation
Overrides:
getTHead in class DefaultHtmlViewRepresentation
Parameters:
style - The value of the style-attribute of the rendered tag.
styleName - The value of the class-attribute of the rendered tag.
Returns:
String of HTML-code

getTHeadEnd

public java.lang.String getTHeadEnd()
Return String: </div>

Specified by:
getTHeadEnd in interface HtmlViewRepresentation
Overrides:
getTHeadEnd in class DefaultHtmlViewRepresentation
Returns:
String of HTML-code