|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.fckeditor.tool.XHtmlTagTool
public class XHtmlTagTool
Java representation of an XHTML tag.
Usage:
XHtmlTagTool tag = XHtmlTagTool("a", "link"); tag.addAttribute("href", "http://google.com"); tag.toString();: <a href="http://google.com">link</a>Note:
SPACE
as the tag's value.
Field Summary | |
---|---|
static String |
SPACE
Indicator to uses non self-closing tag. |
Constructor Summary | |
---|---|
XHtmlTagTool(String name)
Class constructor with tag name. |
|
XHtmlTagTool(String name,
String value)
Class constructor with name and value. |
Method Summary | |
---|---|
void |
addAttribute(String name,
String value)
Adds an attribute to this tag. |
void |
setValue(String value)
Sets the tag value. |
String |
toString()
Creates the HTML representation of this tag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SPACE
Constructor Detail |
---|
public XHtmlTagTool(String name)
name
- the tag name of the new XHtmlTagTool
IllegalArgumentException
- if name
is emptypublic XHtmlTagTool(String name, String value)
name
- the tag name of the new XHtmlTagToolvalue
- the tag value of the new XHtmlTagTool which is the tag body
IllegalArgumentException
- if name
is emptyMethod Detail |
---|
public void setValue(String value)
value
- the tag value which is the tag bodypublic void addAttribute(String name, String value)
name
- attribute namevalue
- attribute value
IllegalArgumentException
- if name
is emptypublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |