objectivehtml.htmlwidget
Class HtmlTableCaption

java.lang.Object
  |
  +--objectivehtml.oms.OMSObject
        |
        +--objectivehtml.htmlwidget.HtmlElement
              |
              +--objectivehtml.htmlwidget.HtmlTableCaption

public class HtmlTableCaption
extends HtmlElement

This class represents the caption of a html table. i.e.

<caption ...>

The object can only exist within the context of a HtmlTable object.

If auto-escape is turned on (default) then the value and option text are escaped before being written out (using HtmlUtils.htmlSpecialChars(String)).

See Also:
HtmlUtils.htmlSpecialChars(String)

Fields inherited from class objectivehtml.htmlwidget.HtmlElement
m_hmAttributes, m_sEndTag, m_sQuoteType, m_sStartTag
 
Constructor Summary
protected HtmlTableCaption(HtmlTable objParent)
          Constructs an instance of HtmlTableCaption.
 
Method Summary
 java.lang.String getCaptionText()
          Returns the caption text.
 HtmlTable getHtmlTable()
          Returns a reference to the table this table caption object is contained in.
 boolean isAutoEscape()
          Returns whether the auto-escape feature is on or not.
 void printHtml(javax.servlet.jsp.JspWriter objWriter, int nOutputType)
          Prints the html that represents this object to the output stream.
 void printHtml(java.io.PrintWriter objWriter, int nOutputType)
          Prints the html that represents this object to the output stream.
 void setAutoEscape(boolean bAutoEscape)
          Sets the auto-escape feature to be either on (default) or off.
 void setCaptionText(java.lang.String sCaptionText)
          Sets the caption text.
 
Methods inherited from class objectivehtml.htmlwidget.HtmlElement
genEndTag, genStartTag, genStartTag, getAttribute, getAttributes, getBooleanAttribute, getQuoteType, printHtml, printHtml, printHtml, printHtml, printHtml, printHtml, setAttribute, setBooleanAttribute, setQuoteType, toString, toString
 
Methods inherited from class objectivehtml.oms.OMSObject
compareClasses, connect, disconnect, emit, isAlive, setAlive, signal, slot, slot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HtmlTableCaption

protected HtmlTableCaption(HtmlTable objParent)
                    throws InvalidParentElementException
Constructs an instance of HtmlTableCaption.
Parameters:
objParent - the parent of this element
Throws:
InvalidParentElementException - if the specified parent element is not valid
Method Detail

getHtmlTable

public HtmlTable getHtmlTable()
Returns a reference to the table this table caption object is contained in.
Returns:
a reference to the table for this caption

setAutoEscape

public void setAutoEscape(boolean bAutoEscape)
Sets the auto-escape feature to be either on (default) or off. If auto-escape is set as true then the caption will have any html entity characters escaped with the HtmlUtils.htmlSpecialChars(String) method.
Parameters:
bAutoEscape - true if you want auto-escape on (default), false otherwise
See Also:
HtmlUtils.htmlSpecialChars(String), isAutoEscape()

isAutoEscape

public boolean isAutoEscape()
Returns whether the auto-escape feature is on or not.
Returns:
true if auto-escape is on, false otherwise
See Also:
setAutoEscape(boolean)

getCaptionText

public java.lang.String getCaptionText()
Returns the caption text.
Returns:
the caption text , null is returned if no caption has been set
See Also:
setCaptionText(String)

setCaptionText

public void setCaptionText(java.lang.String sCaptionText)

Sets the caption text.

If null is specified the caption text is cleared.

Parameters:
sCaptionText - the value for this element
See Also:
getCaptionText()

printHtml

public void printHtml(java.io.PrintWriter objWriter,
                      int nOutputType)
               throws java.io.IOException
Prints the html that represents this object to the output stream.
Overrides:
printHtml in class HtmlElement
Parameters:
objWriter - the output stream for a Servlet object
nOutputType - the output type
Throws:
java.io.IOException - if it cannot write the output

printHtml

public void printHtml(javax.servlet.jsp.JspWriter objWriter,
                      int nOutputType)
               throws java.io.IOException
Prints the html that represents this object to the output stream.
Overrides:
printHtml in class HtmlElement
Parameters:
objWriter - the output stream for a Jsp page
nOutputType - the output type
Throws:
java.io.IOException - if it cannot write the output