public final class TextElement extends Object implements ExportUtils.HtmlExporter.Element
Constructor and Description |
---|
TextElement(String aValue)
Creates a new
TextElement instance. |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
setParent(ExportUtils.HtmlExporter.Element aParent) |
String |
toString() |
String |
toString(ExportUtils.HtmlExporter.MacroResolver aResolver)
Returns the string representation of this HTML-element.
|
public TextElement(String aValue)
TextElement
instance.aValue
- the value of this text element, may be null
.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 void setParent(ExportUtils.HtmlExporter.Element aParent)
aParent
- the parent to setpublic String toString()
toString
in class Object
Object.toString()
public String toString(ExportUtils.HtmlExporter.MacroResolver aResolver)
ExportUtils.HtmlExporter.Element
toString
in interface ExportUtils.HtmlExporter.Element
aResolver
- the macro resolver to use for any found macros.null
.ExportUtils.HtmlExporter.Element.toString(nl.lxtreme.ols.util.ExportUtils.HtmlExporter.MacroResolver)
Copyright © 2015 L'Xtreme IT consultancy. All rights reserved.