net.charlesames.utility.html
Class BarGraphBuilder

java.lang.Object
  extended by net.charlesames.utility.html.HtmlBuilder
      extended by net.charlesames.utility.html.BarGraphBuilder

public class BarGraphBuilder
extends HtmlBuilder

Generates bar graphs using HTML formatting tags.

Author:
Charles Ames

Nested Class Summary
 
Nested classes/interfaces inherited from class net.charlesames.utility.html.HtmlBuilder
HtmlBuilder.Tags
 
Field Summary
 
Fields inherited from class net.charlesames.utility.html.HtmlBuilder
FILE_EXTENSION
 
Constructor Summary
BarGraphBuilder()
          Constructor for BarGraphBuilder instances.
 
Method Summary
 void addValue(int value)
          Add a value (one for each bar) to the domain of the graph.
 java.lang.String build()
          Generate the HTML text
 HtmlColor getBarColor()
           
 int getFontSize()
           
 void setBarColor(HtmlColor barColor)
           
 void setFontSize(int fontSize)
           
 
Methods inherited from class net.charlesames.utility.html.HtmlBuilder
addTableCell, append, appendLineBreak, beginBlockQuote, beginBody, beginCenter, beginDiv, beginHead, beginHtml, beginListItem, beginOrderedList, beginParagraph, beginSpan, beginStyle, beginStyleRule, beginTable, beginTableBody, beginTableCell, beginTableHeader, beginTableHeaderCell, beginTableRow, beginTag, beginUnorderedList, buildAttribute, buildColorDeclaration, buildLink, buildStyleDeclaration, endBlockQuote, endBody, endCenter, endDiv, endHead, endHtml, endListItem, endOrderedList, endParagraph, endSpan, endStyle, endStyleRule, endTable, endTableBody, endTableCell, endTableHeader, endTableHeaderCell, endTableRow, endTag, endUnorderedList, newline, popTag, pushTag, reset, save, tab, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BarGraphBuilder

public BarGraphBuilder()
Constructor for BarGraphBuilder instances.

Method Detail

getBarColor

public HtmlColor getBarColor()
Returns:
HTML color name.

setBarColor

public void setBarColor(HtmlColor barColor)
Parameters:
barColor - HTML color name.

getFontSize

public int getFontSize()
Returns:
Font size in points.

setFontSize

public void setFontSize(int fontSize)
Parameters:
fontSize - Font size in points.

addValue

public void addValue(int value)
Add a value (one for each bar) to the domain of the graph.

Parameters:
value - An integer value

build

public java.lang.String build()
Generate the HTML text

Returns:
HTML text