public class DescriptionList extends AbstractAsciiList implements AsciiList_Description
AsciiList_Description.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
useSingleLine
Flag directing the lists render behavior, true for single line, false for multiline, default is single line.
|
protected int |
wrappedLineIndentation
The indentation to be used if lines of the description need to be wrapped, default is 5.
|
isContinued, items, level, maxItemIndent, postLabelIndent, postLabelStr, preLabelIndent, preLabelStr, widthIMPLICIT_NEWLINE| Constructor and Description |
|---|
DescriptionList() |
| Modifier and Type | Method and Description |
|---|---|
AsciiList_Description |
addItem(String term,
String description)
Adds a new item to the description list.
|
int |
calculateMaxIndentation(AsciiListItem item,
int position)
Calculates indentation for a list item.
|
AsciiList |
copy()
Returns a copy of the list.
|
int |
getWrappedLineIndentation()
Returns the indentation if lines need to be wrapped due to over length compared to a given width.
|
String |
renderItem(AsciiListItem item,
int position)
Renders a particular item of a list.
|
AsciiList |
setListStyle(ListStyle style)
Sets the style of a list.
|
AsciiList_Description |
setWrappedLineIndentation(int indentation)
Sets the indentation if lines need to be wrapped due to over length compared to a given width.
|
AsciiList_Description |
useSingleLine(boolean flag)
Sets the list behavior for the descriptions to single line or multiline.
|
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 boolean useSingleLine
protected int wrappedLineIndentation
public 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 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_Description useSingleLine(boolean flag)
AsciiList_DescriptionuseSingleLine in interface AsciiList_Descriptionflag - true for single line (label and description in one line), false for multiline (separate lines for label and descriptions)public AsciiList_Description addItem(String term, String description)
AsciiList_DescriptionaddItem in interface AsciiList_Descriptionterm - the term of the itemdescription - the description of the termpublic AsciiList_Description setWrappedLineIndentation(int indentation)
AsciiList_DescriptionsetWrappedLineIndentation in interface AsciiList_Descriptionindentation - the indentationpublic int getWrappedLineIndentation()
AsciiList_DescriptiongetWrappedLineIndentation in interface AsciiList_Descriptionpublic AsciiList setListStyle(ListStyle style)
AsciiListsetListStyle in interface AsciiListstyle - new list styleCopyright © 2015–2016. All rights reserved.