objectivehtml.htmlwidget
Class HtmlTag

java.lang.Object
  |
  +--objectivehtml.oms.OMSObject
        |
        +--objectivehtml.htmlwidget.HtmlElement
              |
              +--objectivehtml.htmlwidget.HtmlWidget
                    |
                    +--objectivehtml.htmlwidget.HtmlContainerWidget
                          |
                          +--objectivehtml.htmlwidget.HtmlUnrestrictedContainerWidget
                                |
                                +--objectivehtml.htmlwidget.HtmlTag

public class HtmlTag
extends HtmlUnrestrictedContainerWidget

This class represents a generic html tag element. Html tags which are not directly supported by the toolkit can be used through this object. This widget can have children widgets.

When one of the printHtml methods is called on this widget an end tag is generated if the widget has text set or if the widget has a child. Otherwise no end tag is generated.


Fields inherited from class objectivehtml.htmlwidget.HtmlContainerWidget
m_alChildrenWidgets, m_bAutoEscape, m_sText
 
Fields inherited from class objectivehtml.htmlwidget.HtmlWidget
m_bDestroyed, m_bVisible, m_objHtmlForm, m_objParentWidget
 
Fields inherited from class objectivehtml.htmlwidget.HtmlElement
m_hmAttributes, m_sEndTag, m_sQuoteType, m_sStartTag
 
Constructor Summary
HtmlTag(HtmlContainerWidget objParent, java.lang.String sTagName)
          Constructs an instance of the HtmlTag object with the parent objParent.
 
Method Summary
 java.lang.String getTagName()
          Returns the tag name of this object.
 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.
 
Methods inherited from class objectivehtml.htmlwidget.HtmlUnrestrictedContainerWidget
appendChild, destroy, insertChild, setVisible
 
Methods inherited from class objectivehtml.htmlwidget.HtmlContainerWidget
addHtmlWidget, generateUpdateOrder, getChildrenCount, getChildrenWidgets, getChildWidget, getText, indexOfChildWidget, insertHtmlWidget, isAutoEscape, isChildWidget, isValidChildWidget, removeHtmlWidget, setAttribute, setAutoEscape, setBooleanAttribute, setText, swapHtmlWidgets
 
Methods inherited from class objectivehtml.htmlwidget.HtmlWidget
changeParent, changeParent, getClassAttribute, getHtmlForm, getID, getOnClick, getOnDblClick, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getParent, getStyle, isDestroyed, isVisible, setClassAttribute, setID, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStyle
 
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

HtmlTag

public HtmlTag(HtmlContainerWidget objParent,
               java.lang.String sTagName)
        throws InvalidParentWidgetException,
               InvalidChildWidgetException
Constructs an instance of the HtmlTag object with the parent objParent.
Parameters:
objParent - the parent of this widget
sTagName - the tag name of this widget
Throws:
InvalidParentWidgetException - if the specified parent widget is not valid
InvalidChildWidgetException - if the parent widget does not accept this widget as a child
Method Detail

getTagName

public java.lang.String getTagName()
Returns the tag name of this object.
Returns:
the tagname of this object

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 HtmlContainerWidget
Parameters:
objWriter - the output stream for a Servlet object
nOutputType - the output type
Throws:
java.io.IOException - if it cannot write the output
See Also:
HtmlElement.printHtml(PrintWriter)

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 HtmlContainerWidget
Parameters:
objWriter - the output stream for a Jsp page
nOutputType - the output type
Throws:
java.io.IOException - if it cannot write the output
See Also:
HtmlElement.printHtml(JspWriter)