|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcox.jmatt.java.MathTools.markup.Tag
cox.jmatt.java.MathTools.markup.html.BaseHTag
cox.jmatt.java.MathTools.markup.html.ListTag
public class ListTag
This class provides the <ul> and <ol> tags. Ordered or unordered is determined by the constructor, otherwise the two are identical. The only
content permitted is <li> tags (LITag
class) so that is all that can be added. There is a method to add an item directly (defaults apply)
and another to add a pre-constructed instance.
NOTE: Both types of list tags can contain sublists. To do this construct a separate ListTag
for the sublist, add it to a <li> tag, and
add that tag to this one. The addList()
method here also provides that function provided the <li> holding the sublist can function with
default settings.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class cox.jmatt.java.MathTools.markup.html.BaseHTag |
---|
BaseHTag.TagKeys |
Field Summary |
---|
Fields inherited from class cox.jmatt.java.MathTools.markup.Tag |
---|
myTagName |
Constructor Summary | |
---|---|
ListTag(boolean isOrderedList)
Standard constructor for an empty list tag. |
Method Summary | |
---|---|
ListTag |
addItem(LITag pTag)
Add a pre-constructed LITag . |
ListTag |
addItem(java.lang.String pItemText)
Add an item directly to the tag and return a self-reference. |
ListTag |
addList(ListTag pSubList)
Add a sub-list to the current list. |
ListTag |
copyOf()
Return a copy of this tag. |
static ListTag |
createList(boolean bIsOrdered,
java.lang.Object[] pList,
java.lang.String pItemID)
Create a list, ordered or unordered, from an Object[] array. |
ListTag |
newList(boolean bOrdered,
java.lang.Object[] pList,
java.lang.String pID)
Instance version of createList() . |
ListTag |
setStart(int pStart)
Set the starting number for an ordered list. |
ListTag |
setType(char pType)
Set the 'type=' attribute of an ordered list. |
Methods inherited from class cox.jmatt.java.MathTools.markup.html.BaseHTag |
---|
_addTag, _content, _enableCopy, _setContent, addCDATA, addContent, getID, getRawContent, getTagKey, getTagName, isInBody, setClicked, setCSS, setName, setStyle |
Methods inherited from class cox.jmatt.java.MathTools.markup.Tag |
---|
_addAttribute, _addAttributes, _addNAttribute, _asBoolean, _asDouble, _asInt, _attributes, _clampNAttribute, _clampNAttribute, _fixKey, _setEnableXMLTag, badPizza, closeTag, configureTag, configureTagFromGlobalPizza, makeTag, openTag, reset, setID, toString, validString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ListTag(boolean isOrderedList)
isOrderedList
- true for an <ol> tag, false for <ul>.Method Detail |
---|
public static final ListTag createList(boolean bIsOrdered, java.lang.Object[] pList, java.lang.String pItemID)
Create a list, ordered or unordered, from an Object[] array. If the array sent in is null or empty the return is null. If an element is null it is
skipped. The item ID prefix, if defined, is used to generate an ID for each item. The prefix is prepended to the item count number; the item number not
counting any skipped items. Non-null Object entries are toString()
'ed for the item value.
pList
- The list item array.pItemID
- The item ID prefix. Ignored if null.bIsOrdered
- true for an ordered list, false for unordered.public ListTag newList(boolean bOrdered, java.lang.Object[] pList, java.lang.String pID)
createList()
.
public ListTag addItem(java.lang.String pItemText)
public ListTag addItem(LITag pTag)
LITag
. Ignored if null.
public ListTag addList(ListTag pSubList)
public ListTag copyOf()
public ListTag setType(char pType)
public ListTag setStart(int pStart)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |