|
Copyright (C) 2002, Patrick Tullmann <taglets@tullmann.org> | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.tullmann.taglets.ListTag
A generic Taglet implementation that provides "list-like" default
behavior for handling multiple instances of the tag which occur in
a single block. This class does not actually provide any tags, but
instead provides infrastructure for tags. See ToDo
and
Issue
for tags that are built from this tag.
Customization of the tag is through user Preferences. The
preferences are all stored in the 'ListTag.class' user node (maps
to something like 'org/tullmann/taglets
' in the
per-user repository). In that node, the preferences are prefixed
with the tag-name plus "." (e.g., For an '@todo
' tag
the prefix is 'todo
'). The following suffixes are
used to customize how the tag shows up:
Suffix | Meaning | Default |
---|---|---|
listtype | The type of HTML list (currently just 'ordered' or 'unordered') | Passed to ListTag constructor |
header.text | The header text to prefix the list (e.g., 'To Do:') | Passed to ListTag constructor |
header.color.fg | Foreground color of the header text, any legal HTML color spec is valid. | - (no color) |
header.color.bg | Background color of the header text, any legal HTML color spec is valid. | - (no color) |
header.relsize | Relative size of the header text (e.g., +1, -1, etc.) | - (no change) |
text.color.fg | Foreground color of the text body, any legal HTML color spec is valid. | - (no color) |
text.color.bg | Background color of the text body, any legal HTML color spec is valid. | - (no color) |
text.relsize | Relative size of the text body (e.g., +1, -1, etc.) | - (no change) |
PrefHack
for a simple mechanism to set these preferences.
Support for supressing a tag (e.g., @todo -> @done). |
Support customization of the list bullets. |
Add comments to the methods customization of the list bullets. |
Add other list types? (e.g., the comma-delimited list?). |
Support plural/singular labels. |
Field Summary | |
static org.tullmann.taglets.ListTag.ListType |
ORDERED_LIST
|
static org.tullmann.taglets.ListTag.ListType |
TABLE_LIST
|
protected org.tullmann.taglets.TagPrefs |
tagPrefs
|
static org.tullmann.taglets.ListTag.ListType |
UNORDERED_LIST
|
static org.tullmann.taglets.ListTag.ListType |
VISIBLETABLE_LIST
|
Constructor Summary | |
ListTag(java.lang.String tagName,
java.lang.String tagHeader,
org.tullmann.taglets.ListTag.ListType listType)
Create a new list-behaviour tag. |
|
ListTag(java.lang.String tagName,
java.lang.String prefsName,
java.lang.String tagHeader,
org.tullmann.taglets.ListTag.ListType listType)
|
Method Summary | |
protected void |
emitCustomFooter(java.lang.StringBuffer sbuf,
boolean multi)
Override to insert custom text after the list is complete, but before the list closing tags |
protected void |
emitCustomHeader(java.lang.StringBuffer sbuf,
boolean multi)
Override to insert custom text after the list start, but before the first bit of tag text |
protected void |
emitFooter(java.lang.StringBuffer sbuf,
boolean multi)
Emit footer for HTML version of tag. |
protected void |
emitHeader(java.lang.StringBuffer sbuf,
boolean multi)
Emit header for HTML version of tag. |
protected void |
emitTag(com.sun.javadoc.Tag tag,
java.lang.StringBuffer sbuf,
boolean multi)
|
protected void |
endingTags(java.lang.StringBuffer sbuf)
|
protected void |
forceColorPrefs(org.tullmann.taglets.TagPrefs tagPrefs,
java.lang.String tagPrefix)
|
protected void |
forceCustomDefaultPrefs(org.tullmann.taglets.TagPrefs tagPrefs)
|
protected void |
formatText(java.lang.StringBuffer sbuf,
java.lang.String text,
java.lang.String propName)
Format the given text using the properties under the givne propName into the given StringBuffer. |
java.lang.String |
getName()
|
boolean |
inConstructor()
|
boolean |
inField()
|
boolean |
inMethod()
|
boolean |
inOverview()
|
boolean |
inPackage()
|
boolean |
inType()
|
boolean |
isInlineTag()
|
protected void |
parseTagText(java.lang.StringBuffer sbuf,
java.lang.String text,
boolean multi)
Generate formatted HTML for the given tag text. |
static void |
register(java.util.Map tagletMap,
org.tullmann.taglets.ListTag lt)
Register the given taglet in the given map. |
protected void |
startingTags()
|
java.lang.String |
toString(com.sun.javadoc.Tag tag)
|
java.lang.String |
toString(com.sun.javadoc.Tag[] tags)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final org.tullmann.taglets.TagPrefs tagPrefs
public static final org.tullmann.taglets.ListTag.ListType ORDERED_LIST
public static final org.tullmann.taglets.ListTag.ListType UNORDERED_LIST
public static final org.tullmann.taglets.ListTag.ListType TABLE_LIST
public static final org.tullmann.taglets.ListTag.ListType VISIBLETABLE_LIST
Constructor Detail |
public ListTag(java.lang.String tagName, java.lang.String tagHeader, org.tullmann.taglets.ListTag.ListType listType)
tagHeader
and
listType
parameters can be overridden in properties.
public ListTag(java.lang.String tagName, java.lang.String prefsName, java.lang.String tagHeader, org.tullmann.taglets.ListTag.ListType listType)
Method Detail |
protected void forceCustomDefaultPrefs(org.tullmann.taglets.TagPrefs tagPrefs) throws java.lang.Exception
java.lang.Exception
protected void forceColorPrefs(org.tullmann.taglets.TagPrefs tagPrefs, java.lang.String tagPrefix)
public static void register(java.util.Map tagletMap, org.tullmann.taglets.ListTag lt)
public java.lang.String getName()
getName
in interface com.sun.tools.doclets.Taglet
public boolean isInlineTag()
isInlineTag
in interface com.sun.tools.doclets.Taglet
public boolean inField()
inField
in interface com.sun.tools.doclets.Taglet
public boolean inConstructor()
inConstructor
in interface com.sun.tools.doclets.Taglet
public boolean inMethod()
inMethod
in interface com.sun.tools.doclets.Taglet
public boolean inType()
inType
in interface com.sun.tools.doclets.Taglet
public boolean inPackage()
inPackage
in interface com.sun.tools.doclets.Taglet
public boolean inOverview()
inOverview
in interface com.sun.tools.doclets.Taglet
protected void formatText(java.lang.StringBuffer sbuf, java.lang.String text, java.lang.String propName)
protected void parseTagText(java.lang.StringBuffer sbuf, java.lang.String text, boolean multi)
protected void emitCustomHeader(java.lang.StringBuffer sbuf, boolean multi)
protected void emitCustomFooter(java.lang.StringBuffer sbuf, boolean multi)
protected void emitHeader(java.lang.StringBuffer sbuf, boolean multi)
protected void emitTag(com.sun.javadoc.Tag tag, java.lang.StringBuffer sbuf, boolean multi)
protected void emitFooter(java.lang.StringBuffer sbuf, boolean multi)
protected void startingTags()
protected void endingTags(java.lang.StringBuffer sbuf)
public java.lang.String toString(com.sun.javadoc.Tag tag)
toString
in interface com.sun.tools.doclets.Taglet
public java.lang.String toString(com.sun.javadoc.Tag[] tags)
toString
in interface com.sun.tools.doclets.Taglet
|
See http://www.tullmann.org/pat/taglets/ for the latest and greatest version. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |