Modifier | Constructor and Description |
---|---|
protected |
BaseTag(java.lang.String tagIn)
Public constructor
|
protected |
BaseTag(java.lang.String tagIn,
boolean spaceBefore) |
Modifier and Type | Method and Description |
---|---|
void |
addBody(BaseTag bodyTag)
Adds the given tag to the body of this tag.
|
void |
addBody(java.lang.String bodyIn)
adds to the body of the tag
|
java.lang.String |
getTag() |
boolean |
hasBody()
Returns true if this tag has a body defined.
|
void |
removeAttribute(java.lang.String name)
Removes an attribute of the html tag.
|
java.lang.String |
render()
render the tag into a string
|
java.lang.String |
renderBody()
render the tag body
|
java.lang.String |
renderCloseTag()
render the close tag
|
java.lang.String |
renderOpenTag()
render the open tag and attributes
|
protected java.lang.String |
renderOpenTag(boolean selfClosing)
render the open or self closing tag and attributes
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
set an attribute of the html tag
|
void |
setBody(java.lang.String bodyIn)
sets the body of the tag
|
protected BaseTag(java.lang.String tagIn)
tagIn
- the name of the tagprotected BaseTag(java.lang.String tagIn, boolean spaceBefore)
public java.lang.String getTag()
public void setAttribute(java.lang.String name, java.lang.String value)
name
- the attribute namevalue
- the attribute valuepublic void removeAttribute(java.lang.String name)
name
- the attribute name to be removed.public void setBody(java.lang.String bodyIn)
bodyIn
- the new bodypublic void addBody(java.lang.String bodyIn)
bodyIn
- the new bodypublic void addBody(BaseTag bodyTag)
bodyTag
- Tag to be added to the body of this tag.public java.lang.String render()
protected java.lang.String renderOpenTag(boolean selfClosing)
selfClosing
- if the tag should be self-closedpublic java.lang.String renderOpenTag()
public java.lang.String renderBody()
public java.lang.String renderCloseTag()
public boolean hasBody()