public class List extends AbstractWingElement implements WingMergeableElement, StructuralElement
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
A_TYPE
The name of the type attribute
|
static java.lang.String |
E_LIST
The name of the list element
|
static java.lang.String |
TYPE_BULLETED |
static java.lang.String |
TYPE_DSO_LIST |
static java.lang.String |
TYPE_FORM |
static java.lang.String |
TYPE_GLOSS |
static java.lang.String |
TYPE_ORDERED |
static java.lang.String |
TYPE_PROGRESS |
static java.lang.String |
TYPE_SIMPLE
The possible list types *
|
static java.lang.String[] |
TYPES
All the possible list types collected into one array
|
contextA_ID, A_NAME, A_RENDER| Modifier | Constructor and Description |
|---|---|
protected |
List(WingContext context,
java.lang.String name,
java.lang.String type,
java.lang.String rend)
Construct a new list.
|
| Modifier and Type | Method and Description |
|---|---|
Item |
addItem()
Add an empty unnamed item.
|
void |
addItem(Message key)
Add an item element that contains only translated content.
|
void |
addItem(java.lang.String characters)
Add an item element that contains only character content.
|
Item |
addItem(java.lang.String name,
java.lang.String rend)
Add an item element, which serves a dual purpose.
|
void |
addItemXref(java.lang.String target,
Message key)
Add an item to the list that contains a link.
|
void |
addItemXref(java.lang.String target,
java.lang.String characters)
Add an item to the list that contains a link.
|
void |
addLabel()
Add a label element, they are associated with an item and annotates that
item with a number, a textual description of some sort, or a simple
bullet.
|
void |
addLabel(Message key)
Add a label element, they are associated with an item and annotates that
item with a number, a textual description of some sort, or a simple
bullet.
|
void |
addLabel(java.lang.String characters)
Add a label element, they are associated with an item and annotates that
item with a number, a textual description of some sort, or a simple
bullet.
|
Label |
addLabel(java.lang.String name,
java.lang.String rend)
Add a label element, they are associated with an item and annotates that
item with a number, a textual description of some sort, or a simple
bullet.
|
List |
addList(java.lang.String name)
Add a new sublist to this list.
|
List |
addList(java.lang.String name,
java.lang.String type)
Add a new sublist to this list.
|
List |
addList(java.lang.String name,
java.lang.String type,
java.lang.String rend)
Add a new sublist to this list.
|
void |
dispose()
dispose
|
org.xml.sax.Attributes |
merge(org.xml.sax.Attributes attributes)
Inform this list that it is being merged with an existing element.
|
WingMergeableElement |
mergeChild(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Merge the given SAX startElement event into this list's child.
|
boolean |
mergeEqual(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Determine if the given SAX startElement event is equivalent to this list.
|
Head |
setHead()
Set the head element which is the label associated with this list.
|
void |
setHead(Message key)
Set the head element which is the label associated with this list.
|
void |
setHead(java.lang.String characters)
Set the head element which is the label associated with this list.
|
void |
toSAX(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler,
org.xml.sax.helpers.NamespaceSupport namespaces)
Translate this element and all contained elements into SAX events.
|
endElement, endElement, getWingContext, greater, lesser, require, require, requireFalse, requireTrue, restrict, sendCharacters, setWingContext, startElement, startElementpublic static final java.lang.String E_LIST
public static final java.lang.String A_TYPE
public static final java.lang.String TYPE_SIMPLE
public static final java.lang.String TYPE_ORDERED
public static final java.lang.String TYPE_BULLETED
public static final java.lang.String TYPE_GLOSS
public static final java.lang.String TYPE_PROGRESS
public static final java.lang.String TYPE_FORM
public static final java.lang.String TYPE_DSO_LIST
public static final java.lang.String[] TYPES
protected List(WingContext context, java.lang.String name, java.lang.String type, java.lang.String rend) throws WingException
context - (Required) The context this element is contained in, such as
where to route SAX events and what i18n catalogue to use.name - (Required) a local identifier used to differentiate the
element from its siblings.type - (May be null) determines the list type. If this is blank the
list type is inferred from the context and use.rend - (May be null) a rendering hint used to override the default
display of the element. There are a set of predefined
rendering values, see the class documentation above.WingExceptionpublic Head setHead() throws WingException
WingExceptionpublic void setHead(java.lang.String characters)
throws WingException
characters - (Required) Untranslated character data to be included as the
list's head.WingExceptionpublic void setHead(Message key) throws WingException
key - (Required) Key to the i18n catalogue to translate the content
into the language preferred by the user.WingExceptionpublic Label addLabel(java.lang.String name, java.lang.String rend) throws WingException
name - (May be null) a local identifier used to differentiate the
element from its siblings.rend - (May be null) a rendering hint used to override the default
display of the element.WingExceptionpublic void addLabel(java.lang.String characters)
throws WingException
characters - (Required) Untranslated character data to be included.WingExceptionpublic void addLabel()
throws WingException
WingExceptionpublic void addLabel(Message key) throws WingException
key - (Required) Key to the i18n catalogue to translate the content
into the language preferred by the user.WingExceptionpublic Item addItem() throws WingException
WingExceptionpublic Item addItem(java.lang.String name, java.lang.String rend) throws WingException
name - (May be null) a local identifier used to differentiate the
element from its siblings.rend - (May be null) a rendering hint used to override the default
display of the element. *WingExceptionpublic void addItem(java.lang.String characters)
throws WingException
characters - (Required) Untranslated character data to be included.WingExceptionpublic void addItem(Message key) throws WingException
key - (Required) Key to the i18n catalogue to translate the content
into the language preferred by the user.WingExceptionpublic void addItemXref(java.lang.String target,
java.lang.String characters)
throws WingException
target - (Required) The link target.characters - (Required) Untranslated character data to be included as the
link's body.WingExceptionpublic void addItemXref(java.lang.String target,
Message key)
throws WingException
target - (Required) The link target.key - (Required) i18n key for translating content into the user's
preferred language.WingExceptionpublic List addList(java.lang.String name, java.lang.String type, java.lang.String rend) throws WingException
name - (Required) a local identifier used to differentiate the
element from its siblings.type - (May be null) determines the list type. If this is blank the
list type is inferred from the context and use.rend - (May be null) a rendering hint used to override the default
display of the element.WingExceptionpublic List addList(java.lang.String name, java.lang.String type) throws WingException
name - (Required) a local identifier used to differentiate the
element from its siblings.type - (May be null) determines the list type. If this is blank the
list type is inferred from the context and use.WingExceptionpublic List addList(java.lang.String name) throws WingException
name - (Required) a local identifier used to differentiate the
element from its siblings.WingExceptionpublic boolean mergeEqual(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
mergeEqual in interface WingMergeableElementnamespace - The element's name spacelocalName - The local, unqualified, name for this elementqName - The qualified name for this elementattributes - The element's attributespublic WingMergeableElement mergeChild(java.lang.String namespace, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException, WingException
mergeChild in interface WingMergeableElementnamespace - The element's name spacelocalName - The local, unqualified, name for this element *qName - The qualified name for this elementattributes - The element's attributesorg.xml.sax.SAXExceptionWingExceptionpublic org.xml.sax.Attributes merge(org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException,
WingException
merge in interface WingMergeableElementorg.xml.sax.SAXExceptionWingExceptionpublic void toSAX(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler,
org.xml.sax.helpers.NamespaceSupport namespaces)
throws org.xml.sax.SAXException
toSAX in interface WingElementcontentHandler - (Required) The registered contentHandler where SAX events
should be routed too.lexicalHandler - (Required) The registered lexicalHandler where lexical
events (such as CDATA, DTD, etc) should be routed too.namespaces - (Required) SAX Helper class to keep track of namespaces able
to determine the correct prefix for a given namespace URI.org.xml.sax.SAXExceptionpublic void dispose()
dispose in interface WingElementdispose in class AbstractWingElementCopyright © 2018 DuraSpace. All Rights Reserved.