|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.lxtreme.ols.util.export.TagElement
public final class TagElement
Provides a "tag" element, such as <div>-elements.
Constructor Summary | |
---|---|
TagElement(String aName)
Creates a new TagElement instance. |
|
TagElement(String aName,
boolean aNeedsCloseTag)
Creates a new TagElement instance. |
Method Summary | |
---|---|
ExportUtils.HtmlExporter.Element |
addAttribute(String aName,
String aValue)
Adds an attribute to this element. |
ExportUtils.HtmlExporter.Element |
addChild(ExportUtils.HtmlExporter.Element aChild)
Adds a new child element to this element. |
ExportUtils.HtmlExporter.Element |
addChild(String aName)
Adds a new child element to this element. |
ExportUtils.HtmlExporter.Element |
addContent(String... aValue)
Adds text content to this element. |
ExportUtils.HtmlExporter.Element |
clone()
Creates a deep copy of this element. |
Collection<ExportUtils.HtmlExporter.Attribute> |
getAttributes()
Returns the attributes of this element. |
ExportUtils.HtmlExporter.Element |
getChildByName(String aName)
Returns the first child with the given name. |
Collection<ExportUtils.HtmlExporter.Element> |
getChildren()
Returns the child-elements of this element. |
String |
getName()
Returns the name of this element. |
String |
toString()
|
String |
toString(ExportUtils.HtmlExporter.MacroResolver aResolver)
Returns the string representation of this HTML-element. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TagElement(String aName)
TagElement
instance.
aName
- the name of this tag element, cannot be null
.public TagElement(String aName, boolean aNeedsCloseTag)
TagElement
instance.
aName
- the name of this tag element, cannot be null
;aNeedsCloseTag
- true
if a separate closing tag is needed,
false
if this tag can be closed in an inline manner.Method Detail |
---|
public ExportUtils.HtmlExporter.Element addAttribute(String aName, String aValue)
addAttribute
in interface ExportUtils.HtmlExporter.Element
aName
- the name of the attribute to add;aValue
- the value of the attribute to add.
public ExportUtils.HtmlExporter.Element addChild(ExportUtils.HtmlExporter.Element aChild)
addChild
in interface ExportUtils.HtmlExporter.Element
aChild
- the child element to add, cannot be null
.
public ExportUtils.HtmlExporter.Element addChild(String aName)
addChild
in interface ExportUtils.HtmlExporter.Element
aName
- the name of the child element to add, cannot be
null
.
public ExportUtils.HtmlExporter.Element addContent(String... aValue)
addContent
in interface ExportUtils.HtmlExporter.Element
aValue
- the text-values to add, cannot be null
.
public ExportUtils.HtmlExporter.Element clone()
clone
in interface ExportUtils.HtmlExporter.Element
clone
in class Object
Object.clone()
public Collection<ExportUtils.HtmlExporter.Attribute> getAttributes()
getAttributes
in interface ExportUtils.HtmlExporter.Element
null
.public ExportUtils.HtmlExporter.Element getChildByName(String aName)
getChildByName
in interface ExportUtils.HtmlExporter.Element
aName
- the name of the child to get, cannot be null
.
null
if no
such child was found.public Collection<ExportUtils.HtmlExporter.Element> getChildren()
getChildren
in interface ExportUtils.HtmlExporter.Element
null
.public String getName()
getName
in interface ExportUtils.HtmlExporter.Element
null
.public String toString()
toString
in class Object
public String toString(ExportUtils.HtmlExporter.MacroResolver aResolver)
toString
in interface ExportUtils.HtmlExporter.Element
aResolver
- the macro resolver to use for any found macros.
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |