addList
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addPageBorders
- addProperties
- addSection
- createDocx
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- importHeadersAndFooters
- importStyles
- modifyPageLayout
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- setRTL
- addBibliography
- addBookmark
- addBreak
- addChart
- addCitation
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOLE
- addPageNumber
- addShape
- addSimpleField
- addSource
- addStructuredDocumentTag
- addTable
- addTableContents
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteTemplateBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- tickCheckbox
addList
BASIC / ADVANCED / PREMIUM
Inserts (nested) lists into the Word document.
Description
public void addList(ArrayList data) throws Exception
public void addList(ArrayList data, String styleType) throws Exception
public void addList(ArrayList data, String styleType, OptionsList options) throws Exception
This method allows the insertion of lists (numbered or with bullets) into your Word document.
You may also include nested lists by means of nested arrays of data and fully customize its contents with the use of WordML fragments.
The following style types are always available:
- Clear: with no bullet or indentation. This is the default value.
- Unordered: the standard bulleted list of Word.
- Ordered: the standard ordered list of Word.
You may also use the list styles created via the createListStyle method using the name you gave to your custom list.
Parameters
itemList
The ArrayList of data with the (nested) list of items. The possible values of each array entry are:
- A string of text.
- An inline WordFragment: all block elements are removed prior to insertion.
- An ArrayList.
styleType
0 (clear), 1 (inordinate) (default), 2 (numerical) or the name of the created list
options
Option | Type | Description |
---|---|---|
bold | Boolean | If true the text will be shown in bold characters. |
caps | Boolean | If true displays text in capital letters. |
color | String | Hexadecimal color value: "FF0000", "000000"... |
font | String | Font family: "Arial", "Calibri"... |
fontSize | Integer | Font size in points. |
highlightColor | String | Highlights the run of text. The available colors are: black, blue, cyan, green, magenta, red, yellow, white, darkBlue, darkCyan, darkGreen, darkMagenta, darkRed, darkYellow, darkGray, lightGray, none. |
italic | Boolean | If true displays the text in italics. |
numId | positive Integer | Sets a numId value. Useful to generate a continue numbering. |
outlineLvl | Integer | Heading level (1-9). |
pStyle | String | Word style to be used. |
smallCaps | Boolean | If true displays text in small capital letters. |
underline | String | Underlines text. Possible values are: single, words, double, dotted, dash and wave. |
useWordFragmentStyles | Boolean | Use WordFragment paragraph styles. |