cox.jmatt.java.MathTools.markup.html
Class ContainerTag

java.lang.Object
  extended by cox.jmatt.java.MathTools.markup.Tag
      extended by cox.jmatt.java.MathTools.markup.html.BaseHTag
          extended by cox.jmatt.java.MathTools.markup.html.ContainerTag
Direct Known Subclasses:
PTag, SimpleDecorationTag

public abstract class ContainerTag
extends BaseHTag

This is the abstract superclass of tag classes meant to contain other tags. It provides a basic tag-adding method for any tag that can be added to the <body> of a document although it doesn't provide that particular tag. If a <head>-specific tag is added it is ignored.

Also provided are 'quick-add' methods designed to add simple tag-enclosed text. These methods do create tag classes so they do inherit any default values for such. For more complexity use the tag classes or define a CSS rule to affect unadorned or un-CSS-class'ed tags.


Nested Class Summary
 
Nested classes/interfaces inherited from class cox.jmatt.java.MathTools.markup.html.BaseHTag
BaseHTag.TagKeys
 
Field Summary
 
Fields inherited from class cox.jmatt.java.MathTools.markup.Tag
myTagName
 
Constructor Summary
protected ContainerTag(BaseHTag.TagKeys pKey)
          Standard constructor for building HTML tag classes.
 
Method Summary
 void addAnchor(java.lang.String pHREF, java.lang.String pContent)
          Quickly add a link('<a>' tag) to the current tag.
 void addBold(java.lang.String pContent)
          Quickly add bold text to the current tag.
 void addBQ(java.lang.String pContent)
          Quickly add block-quote text to the current tag.
 void addBreak()
          Add a <br /> tag.
 void addEM(java.lang.String pContent)
          Quickly add emphasized text to the current tag.
 void addHeading(byte pLevel, java.lang.String pContent)
          Quickly add a heading tag.
 void addHR()
          Add a horizontal rule ('<hr>').
 void addImage(java.lang.String pSrc)
          Quickly add an image to the current tag.
 void addItalic(java.lang.String pContent)
          Quickly add italicized text to the current tag.
 void addUnderline(java.lang.String pContent)
          Quickly add underlined text to the current tag.
 
Methods inherited from class cox.jmatt.java.MathTools.markup.html.BaseHTag
_addTag, _content, _enableCopy, _setContent, addCDATA, addContent, getID, getRawContent, getTagKey, getTagName, isInBody, setClicked, setCSS, setName, setStyle
 
Methods inherited from class cox.jmatt.java.MathTools.markup.Tag
_addAttribute, _addAttributes, _addNAttribute, _asBoolean, _asDouble, _asInt, _attributes, _clampNAttribute, _clampNAttribute, _fixKey, _setEnableXMLTag, badPizza, closeTag, configureTag, configureTagFromGlobalPizza, makeTag, openTag, reset, setID, toString, validString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerTag

protected ContainerTag(BaseHTag.TagKeys pKey)
Standard constructor for building HTML tag classes. If a copy is created its 'id=' attribute is cleared.

Method Detail

addItalic

public void addItalic(java.lang.String pContent)
Quickly add italicized text to the current tag. Ignored if content is null or blank.


addBold

public void addBold(java.lang.String pContent)
Quickly add bold text to the current tag. Ignored if content is null or blank.


addUnderline

public void addUnderline(java.lang.String pContent)
Quickly add underlined text to the current tag. Ignored if content is null or blank.


addEM

public void addEM(java.lang.String pContent)
Quickly add emphasized text to the current tag. Ignored if content is null or blank.


addHeading

public void addHeading(byte pLevel,
                       java.lang.String pContent)
Quickly add a heading tag. Ignored if content is null or blank or the level is not between 1 and 6 inclusive.


addHR

public void addHR()
Add a horizontal rule ('<hr>'). This is the default flavor, no width specified.


addBQ

public void addBQ(java.lang.String pContent)
Quickly add block-quote text to the current tag. Ignored if content is null or blank.


addImage

public void addImage(java.lang.String pSrc)
Quickly add an image to the current tag. Ignored if pSrc is null or blank.

Parameters:
pSrc - The 'src=' attribute (image source).

addAnchor

public void addAnchor(java.lang.String pHREF,
                      java.lang.String pContent)
Quickly add a link('<a>' tag) to the current tag. Ignored if pHREF and pContent are null or blank.


addBreak

public void addBreak()
Add a <br /> tag. A newline is appended afterward!