|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.doc.DocumentFragment
info.informatica.html.tag.HTMLTag
public abstract class HTMLTag
HTML Tag.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class info.informatica.doc.DocumentFragment |
|---|
info.informatica.doc.DocumentFragment.FragmentComp, info.informatica.doc.DocumentFragment.NotFragmentComp |
| Method Summary | |
|---|---|
void |
align(int i)
|
String |
endTag()
Gets the end-Tag form of this tag. |
int |
getAlignment()
|
Attributes |
getAttributes()
Returns the tag attributes. |
info.informatica.doc.FragmentPosition |
getBlockPosition()
Gets the position of this tag, intended as a block, thus including the start and close tags if any tag character data is inside. |
String |
getId()
Gets the tag ID. |
abstract String |
getName()
Gets the name of the tag. |
HTMLTag |
getParent()
Get this tag's parent tag. |
org.w3c.dom.css.CSSStyleDeclaration |
getStyle()
Gets the style declaration contained inside the style
attribute. |
String |
getStyleClass()
Gets the class attribute used for style sheets. |
info.informatica.doc.DocumentFragment |
getTagData()
Gets the document fragment inside the start and end tags, if any. |
boolean |
isSelfClosing()
Is this tag self-closing in XHTML sense? |
int |
length()
The character length of this tag, in HTML style (without the slash at the end of the start tag). |
void |
onAttributeRemoved(String attrname)
Called when removing any attribute. |
void |
onAttributes(String attrname,
String attrvalue)
This method must be called when setting or modifying an attribute. |
void |
onAttributeStringSet(String attributes)
Called when the attributes are set in form of a string containing one or more name=value attributes. |
void |
onDummyAttributes(String attrname)
Called when a plain-old HTML dummy attribute is set. |
void |
setAttributes(Attributes attr)
Sets the attributes of the tag. |
void |
setId(String id)
Sets the id attribute. |
void |
setParent(HTMLTag parent)
Set this tag's parent tag. |
void |
setSelfClosing()
|
void |
setSelfClosing(boolean selfClosing)
|
void |
setTagData(info.informatica.doc.DocumentFragment tagdata)
Sets the document fragment inside the start and end tags. |
void |
setTagData(String text)
Convenience method that sets the text inside the start and end tags. |
String |
startTag()
Gets the start-Tag form of this tag. |
String |
toString()
|
String |
toString(info.informatica.doc.DocumentFragment el)
Gives a String representation of the tag as startTag + fragment + endTag. |
String |
toString(String innerstring)
Gives a String representation of the tag as startTag + innerstring + endTag. |
String |
toXml()
Gives an XHTML representation of this tag. |
void |
vAlign(int i)
|
| Methods inherited from class info.informatica.doc.DocumentFragment |
|---|
adjustWidth, compareTo, getCurrentPosition, getPosition, setPosition |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void setParent(HTMLTag parent)
parent - the parent tag.public void onAttributeStringSet(String attributes)
AttributeListener
onAttributeStringSet in interface AttributeListenerattributes - the string containing the set of attributes.public HTMLTag getParent()
public boolean isSelfClosing()
public void setSelfClosing(boolean selfClosing)
public void setSelfClosing()
public void onAttributes(String attrname,
String attrvalue)
throws TagParsingException
AttributeListener
onAttributes in interface AttributeListenerattrname - the attribute name.attrvalue - the attribute value.
TagParsingException - if the name of the
attribute is syntactically wrong.
public void onDummyAttributes(String attrname)
throws TagParsingException
AttributeListener
onDummyAttributes in interface AttributeListenerattrname - the attribute name.
TagParsingException
public void onAttributeRemoved(String attrname)
throws TagParsingException
AttributeListener
onAttributeRemoved in interface AttributeListenerattrname - the attribute name.
TagParsingExceptionpublic abstract String getName()
Must return the lowercase name of this tag.
public String getId()
public Attributes getAttributes()
public void setAttributes(Attributes attr)
public final void setId(String id)
throws TagParsingException
id attribute.
id - the id attribute.
TagParsingException - if a problem arises when parsing
the attributes.
public String getStyleClass()
throws TagParsingException
class attribute used for style sheets.
class attribute.
TagParsingException - if a problem arises when parsing
the attributes.
public org.w3c.dom.css.CSSStyleDeclaration getStyle()
throws TagParsingException
style
attribute.
TagParsingException - if a problem arises when parsing
the attributes or the style declaration.public void align(int i)
public int getAlignment()
public void vAlign(int i)
public String toString()
toString in class Objectpublic String toString(info.informatica.doc.DocumentFragment el)
For example, if this tag was an anchor with the href attribute
"example.html", calling with argument "
" would
return:
<a href="example.html"><img src="foo.jpg"></a>
el - the fragment to put between the start and close tags.
public String toString(String innerstring)
For example, if this tag was an anchor with the href attribute "example.html", calling with argument "Example page" would return:
<a href="example.html">Example page</a>
innerstring - the string to put between the start and close tags.
public String toXml()
It is useful for cases where you need a tag representation as <tagname attributes/>.
public String startTag()
For example, the start-Tag of a "tr" tag with bgcolor
attribute "white" is <tr bgcolor="white">.
public String endTag()
For example, the end-Tag of a "p" tag is </p>.
This is returned regardless of this tag being self-closing or not.
public int length()
length in class info.informatica.doc.DocumentFragmentpublic void setTagData(info.informatica.doc.DocumentFragment tagdata)
tagdata - the document fragment inside the start and end tags.public void setTagData(String text)
text - the text inside the start and end tags.public info.informatica.doc.DocumentFragment getTagData()
public info.informatica.doc.FragmentPosition getBlockPosition()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||