public class List extends AbstractWingElement implements WingMergeableElement, StructuralElement
| Modifier and Type | Field and Description |
|---|---|
static String |
A_TYPE
The name of the type attribute
|
static String |
E_LIST
The name of the list element
|
static String |
TYPE_BULLETED |
static String |
TYPE_DSO_LIST |
static String |
TYPE_FORM |
static String |
TYPE_GLOSS |
static String |
TYPE_ORDERED |
static String |
TYPE_PROGRESS |
static String |
TYPE_SIMPLE
The possible list types *
|
static 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,
String name,
String type,
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(String characters)
Add an item element that contains only character content.
|
Item |
addItem(String name,
String rend)
Add an item element, which serves a dual purpose.
|
void |
addItemXref(String target,
Message key)
Add an item to the list that contains a link.
|
void |
addItemXref(String target,
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(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(String name,
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(String name)
Add a new sublist to this list.
|
List |
addList(String name,
String type)
Add a new sublist to this list.
|
List |
addList(String name,
String type,
String rend)
Add a new sublist to this list.
|
void |
dispose()
dispose
|
Attributes |
merge(Attributes attributes)
Inform this list that it is being merged with an existing element.
|
WingMergeableElement |
mergeChild(String namespace,
String localName,
String qName,
Attributes attributes)
Merge the given SAX startElement event into this list's child.
|
boolean |
mergeEqual(String namespace,
String localName,
String qName,
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(String characters)
Set the head element which is the label associated with this list.
|
void |
toSAX(ContentHandler contentHandler,
LexicalHandler lexicalHandler,
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 String E_LIST
public static final String A_TYPE
public static final String TYPE_SIMPLE
public static final String TYPE_ORDERED
public static final String TYPE_BULLETED
public static final String TYPE_GLOSS
public static final String TYPE_PROGRESS
public static final String TYPE_FORM
public static final String TYPE_DSO_LIST
public static final String[] TYPES
protected List(WingContext context, String name, String type, 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(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(String name, 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(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(String name, 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(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(String target, 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(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(String name, String type, 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(String name, 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(String name) throws WingException
name - (Required) a local identifier used to differentiate the
element from its siblings.WingExceptionpublic boolean mergeEqual(String namespace, String localName, String qName, 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(String namespace, String localName, String qName, Attributes attributes) throws 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 attributesSAXExceptionWingExceptionpublic Attributes merge(Attributes attributes) throws SAXException, WingException
merge in interface WingMergeableElementSAXExceptionWingExceptionpublic void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces) throws 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.SAXExceptionpublic void dispose()
dispose in interface WingElementdispose in class AbstractWingElementCopyright © 2015 DuraSpace. All Rights Reserved.