public class CheckList extends AbstractAsciiList implements AsciiList_Check
AsciiList_Check.| Modifier and Type | Field and Description |
|---|---|
protected ListStyle_CheckNested |
style
The style for list items.
|
isContinued, items, level, maxItemIndent, postLabelIndent, postLabelStr, preLabelIndent, preLabelStr, widthIMPLICIT_NEWLINE| Constructor and Description |
|---|
CheckList()
Creates a new check list.
|
CheckList(boolean isContinued)
Creates a new check list with continue flag.
|
CheckList(CheckList list)
Creates a new check list as a copy of the original list.
|
| Modifier and Type | Method and Description |
|---|---|
AsciiList_Check |
addAllItems(Collection<String> items)
Adds a collection of new items to the list, all set to "unchecked".
|
AsciiList_Check |
addItem(String item)
Adds a new item which is set to "unchecked".
|
AsciiList_Check |
addItemChecked(String item)
Adds a new item which is set to "checked".
|
protected String |
calculateItemLabel(AsciiListItem item)
Calculates and returns the label for a list item.
|
int |
calculateMaxIndentation(AsciiListItem item,
int position)
Calculates indentation for a list item.
|
AsciiList |
copy()
Returns a copy of the list.
|
String |
renderItem(AsciiListItem item,
int position)
Renders a particular item of a list.
|
AsciiList_Check |
setListStyle(ListStyle style)
Sets the style of a list.
|
AsciiList_Check |
setPostIndent(int indent)
Sets the indentation to be used for an item after the label (and before the post-label string).
|
AsciiList_Check |
setPostLabel(String postLabel)
Sets a string to be printed after an item label (and before the post-label indentation).
|
AsciiList_Check |
setPreLabel(String preLabel)
Sets a string to be printed before an item label (and after the pre-label indentation).
|
calculateMaxIndentation, getItems, getLevel, getPostLabelIndent, getPostLabelString, getPreLabelIndent, getPreLabelString, isContinuedList, prepareRender, render, setLabelDefaults, setLevel, setPostLabelIndent, setPostLabelString, setPreLabelIndent, setPreLabelString, setWidth, wrapItem, wrapItemNextLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalculateMaxIndentation, getItems, getLevel, getPostLabelIndent, getPostLabelString, getPreLabelIndent, getPreLabelString, isContinuedList, prepareRender, render, setLabelDefaults, setLevel, setPostLabelIndent, setPostLabelString, setPreLabelIndent, setPreLabelString, setWidthprotected ListStyle_CheckNested style
public CheckList()
public CheckList(boolean isContinued)
isContinued - true if continued from previous list of same type, false otherwisepublic CheckList(CheckList list)
list - original listpublic AsciiList_Check addItem(String item)
AsciiList_CheckaddItem in interface AsciiList_Checkitem - new item, only added if not blankpublic AsciiList_Check addItemChecked(String item)
AsciiList_CheckaddItemChecked in interface AsciiList_Checkitem - content for the checked itempublic AsciiList_Check setPreLabel(String preLabel)
AsciiList_ChecksetPreLabel in interface AsciiList_CheckpreLabel - string for pre-labelpublic AsciiList_Check setPostLabel(String postLabel)
AsciiList_ChecksetPostLabel in interface AsciiList_CheckpostLabel - string for post labelpublic AsciiList_Check setPostIndent(int indent)
AsciiList_ChecksetPostIndent in interface AsciiList_Checkindent - post-label indentation, negative integer will use defaultprotected String calculateItemLabel(AsciiListItem item)
item - list item for calculationpublic String renderItem(AsciiListItem item, int position)
AsciiListrenderItem in interface AsciiListitem - the item to be renderedposition - the position of the item in the item listpublic AsciiList_Check setListStyle(ListStyle style)
AsciiListsetListStyle in interface AsciiListstyle - new list stylepublic AsciiList copy()
AsciiListpublic int calculateMaxIndentation(AsciiListItem item, int position)
AsciiListcalculateMaxIndentation in interface AsciiListitem - the item to be used for calculationposition - the position of the item in the item listpublic AsciiList_Check addAllItems(Collection<String> items)
AsciiList_CheckaddAllItems in interface AsciiList_Checkitems - collection of items, individual items only added if not blankCopyright © 2015–2016. All rights reserved.