|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--prupp.html.HTMLTag
A class to represent a html-tag.
Constructor Summary | |
HTMLTag(java.lang.String type)
Create a tag with given type. |
|
HTMLTag(java.lang.String type,
boolean comment)
Create a tag with given type and choose if it is a comment. |
Method Summary | |
java.lang.String |
getAttribute(java.lang.String type)
Get the attribute for the given type |
java.lang.String |
getType()
return the type of this tag. |
boolean |
isComment()
is this tag a comment? |
static void |
main(java.lang.String[] args)
simple test program |
void |
removeAttribute(java.lang.String type)
removes the given attribute for the tag. |
void |
setAttribute(java.lang.String key)
Set an attribute for this tag (like the NOWRAP attribute in TD-tags) |
void |
setAttribute(java.lang.String key,
java.lang.String value)
Set a key=value parameter for this type |
void |
setType(java.lang.String type)
set the type of this tag. |
java.lang.String |
toString()
Give the string representation of this tag |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public HTMLTag(java.lang.String type)
type
- the type of the tag e.g. A, IMG, B, Ppublic HTMLTag(java.lang.String type, boolean comment)
type
- the type of the tag e.g. A, IMG, B, Pcomment
- true if this tag is a comment false otherwise.Method Detail |
public boolean isComment()
public java.lang.String getAttribute(java.lang.String type)
type
- the key were looking for a value to.public void setAttribute(java.lang.String key)
key
- the key were setting.public void setAttribute(java.lang.String key, java.lang.String value)
key
- the keystring to set.value
- the value of the key, if null just set an attribute.public void removeAttribute(java.lang.String type)
type
- the attribute to removepublic java.lang.String toString()
public java.lang.String getType()
public void setType(java.lang.String type)
type
- the new type of this tag.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |