|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.ajaxtags.helpers.AbstractHTMLElement
public abstract class AbstractHTMLElement
This class should help to write HTML-Tags we will have a simple append operation and a easy use in connection with strings.
Nested Class Summary | |
---|---|
static class |
AbstractHTMLElement.HTMLAttribute
A simple enumeration holding some HTML-Attributes we are using. |
Constructor Summary | |
---|---|
protected |
AbstractHTMLElement(String name)
Create a HTML element. |
protected |
AbstractHTMLElement(String name,
String id)
Create a HTML element. |
protected |
AbstractHTMLElement(String name,
String id,
String body)
Create a HTML element. |
Method Summary | |
---|---|
AbstractHTMLElement |
append(char c)
Append a char. |
AbstractHTMLElement |
append(CharSequence string)
Append CharSequence to this object. |
AbstractHTMLElement |
append(CharSequence csq,
int start,
int end)
|
char |
charAt(int index)
|
protected void |
cleanAttributes()
Cleaning the attributes. |
protected SortedMap<Object,String> |
getAttributes()
|
String |
getBody()
|
String |
getClassName()
|
String |
getId()
|
protected String |
getName()
|
int |
length()
|
void |
setBody(CharSequence body)
Set the body content. |
void |
setClassName(String className)
Set the class name attribute. |
void |
setId(String id)
Set the id attribute. |
CharSequence |
subSequence(int start,
int end)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected AbstractHTMLElement(String name, String id, String body)
name
- name of start and end tagid
- id of elementbody
- contentprotected AbstractHTMLElement(String name)
name
- the tag nameprotected AbstractHTMLElement(String name, String id)
name
- the tag nameid
- the id attributeMethod Detail |
---|
protected final SortedMap<Object,String> getAttributes()
protected final String getName()
public final String getBody()
public final void setBody(CharSequence body)
body
- the body contentpublic final String getClassName()
public final void setClassName(String className)
className
- the class attribute valuepublic final String getId()
public final void setId(String id)
id
- the id attribute valuepublic final int length()
length
in interface CharSequence
public final char charAt(int index)
charAt
in interface CharSequence
index
- the index
CharSequence.charAt(int)
public final CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
start
- the start indexend
- the end index
CharSequence.subSequence(int, int)
protected void cleanAttributes()
public final String toString()
toString
in interface CharSequence
toString
in class Object
public final AbstractHTMLElement append(CharSequence string)
CharSequence
to this object.
append
in interface Appendable
string
- the data to append
public final AbstractHTMLElement append(char c)
append
in interface Appendable
c
- the char to append
public final AbstractHTMLElement append(CharSequence csq, int start, int end)
append
in interface Appendable
csq
- the char sequencestart
- the start indexend
- the end index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |