|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectview.xhtml.HtmlObject
view.xhtml.HtmlElement
public abstract class HtmlElement
Nested Class Summary | |
---|---|
private class |
HtmlElement.ElementAttribute
A private class for HTML element attributes. |
Field Summary | |
---|---|
private java.util.ArrayList<HtmlElement.ElementAttribute> |
attributes
|
private java.lang.String |
tag_name
|
Constructor Summary | |
---|---|
HtmlElement(java.lang.String element_tag_name)
Constructs the element. |
Method Summary | |
---|---|
private java.lang.String |
getAttributeList()
Returns the HTML source code the element's attribute list. |
protected java.lang.String |
getCloseTag()
Constructs and returns the close tag of the element. |
protected java.lang.String |
getCloseTag(int indent_level)
As above but with indentation. |
protected java.lang.String |
getStartTag(boolean close)
Constructs and returns the start tag of the element. |
protected java.lang.String |
getStartTag(int indent_level,
boolean close)
As above but with indendation. |
HtmlElement |
setAttribute(java.lang.String attribute_name,
java.lang.String attribute_value)
Sets the value of an attribute of the element. |
HtmlElement |
setClass(java.lang.String class_name)
A short method for setting the 'class' attribute. |
HtmlElement |
setId(java.lang.String id)
A short method for setting the 'id' attribute. |
HtmlElement |
setName(java.lang.String name)
A short method for setting the 'name' attribute. |
Methods inherited from class view.xhtml.HtmlObject |
---|
getHtml, getHtml, getHtml, getIndent, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final transient java.lang.String tag_name
private final transient java.util.ArrayList<HtmlElement.ElementAttribute> attributes
Constructor Detail |
---|
public HtmlElement(java.lang.String element_tag_name)
element_tag_name
- the name of the element's tag.Method Detail |
---|
private java.lang.String getAttributeList()
public final HtmlElement setAttribute(java.lang.String attribute_name, java.lang.String attribute_value)
attribute_name
- the name of the attribute to set.attribute_value
- the value to set for the attribute.
protected final java.lang.String getStartTag(boolean close)
close
- if true, the tag is also closed,
this is required for empty elements.protected final java.lang.String getStartTag(int indent_level, boolean close)
protected final java.lang.String getCloseTag()
protected final java.lang.String getCloseTag(int indent_level)
public final HtmlElement setName(java.lang.String name)
name
- a value for 'name'.public final HtmlElement setId(java.lang.String id)
id
- a value for 'id'.public final HtmlElement setClass(java.lang.String class_name)
class_name
- a value for 'class'.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |