|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcookxml.core.taglibrary.SingleNSTagLibrary
cookxml.core.taglibrary.InheritableTagLibrary
public class InheritableTagLibrary
This tag library class avoids the hassele of setting up all the things (adders and setters) for a tag. It suited perfectly for Swing in which most components inherit JComponent.
Constructor Summary | |
---|---|
InheritableTagLibrary()
Construct a tag library that doesn't have a parent. |
|
InheritableTagLibrary(TagLibrary parentTagLibrary)
Construct a tag library with a parent. |
Method Summary | |
---|---|
void |
addAdder(String tag,
Adder adder)
Instead of creating an adder that does it all, this function internally creates a compound adder that combine the functionalities of individual specialized adders. |
Adder |
getAdder(String ns,
String tag)
Get the Adder delegate associated with the namespace and tag. |
Map |
getAttributes(String ns,
String tag)
This function reports the attributes associated with a particular tag. |
LinkedList |
getParentTags(String tag)
Retrieve the direct parent tags. |
LinkedList |
getParentTags(String ns,
String tag)
This for documentation purpose to retrieve the direct parent tags. |
Setter |
getSetter(String ns,
String tag,
String attrNS,
String attr)
Get the Setter delegate associated with the namespace and tag. |
void |
inheritTag(String parentTag,
String thisTag)
create a tag inheritance. |
void |
inheritTag(String parentNs,
String parentTag,
String thisTag)
Create a tag inheritance. |
Methods inherited from class cookxml.core.taglibrary.SingleNSTagLibrary |
---|
getConverter, getConverters, getCreator, getNameSpace, getNameSpaces, getParent, getSpecialCreator, getTags, setAdder, setConverter, setCreator, setNameSpace, setSetter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InheritableTagLibrary()
public InheritableTagLibrary(TagLibrary parentTagLibrary)
parentTagLibrary
- the parent tag library.Method Detail |
---|
public void inheritTag(String parentNs, String parentTag, String thisTag)
parentNs
- the optional namespace of the parent tag. If null, then use the same
name space as the childTag.parentTag
- the parent tag namethisTag
- the child tag namepublic void inheritTag(String parentTag, String thisTag)
parentTag
- the parent tag namethisTag
- the child tag namepublic Setter getSetter(String ns, String tag, String attrNS, String attr)
TagLibrary
getSetter
in interface TagLibrary
getSetter
in class SingleNSTagLibrary
ns
- the namespace.tag
- the tag name.attrNS
- the attribute namespace.attr
- the attribute name @return the Setter delegate.public Adder getAdder(String ns, String tag)
TagLibrary
getAdder
in interface TagLibrary
getAdder
in class SingleNSTagLibrary
ns
- the tag namespace.tag
- the tag name.
public void addAdder(String tag, Adder adder)
tag
- the tag name.adder
- the individual Adder.public LinkedList getParentTags(String tag)
tag
- the tag name
public LinkedList getParentTags(String ns, String tag)
ns
- the namespace of the tag.tag
- the tag name
public Map getAttributes(String ns, String tag)
DocletTagLibrary
The returned map uses XML namespace as the key, and a string array of attribute names as the value as its entries.
getAttributes
in interface DocletTagLibrary
getAttributes
in class SingleNSTagLibrary
ns
- the namespace of the tag.tag
- the tag name.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |