Class ListItem
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
com.gitlab.pdftk_java.com.lowagie.text.Phrase
com.gitlab.pdftk_java.com.lowagie.text.Paragraph
com.gitlab.pdftk_java.com.lowagie.text.ListItem
- All Implemented Interfaces:
Element, MarkupAttributes, TextElementArray, Serializable, Cloneable, Iterable, Collection, List, RandomAccess, SequencedCollection
A
ListItem is a Paragraph
that can be added to a List.
Example 1:
List list = new List(true, 20);
list.add(new ListItem("First line"));
list.add(new ListItem("The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?"));
list.add(new ListItem("Third line"));
The result of this code looks like this:
- First line
- The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?
- Third line
List overview = new List(false, 10);
overview.add(new ListItem("This is an item"));
overview.add("This is another item");
The result of this code looks like this:
- This is an item
- This is another item
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longA serial version UIDprivate Chunkthis is the symbol that wil proceed the listitem.Fields inherited from class Paragraph
alignment, indentationLeft, indentationRight, keeptogether, multipliedLeading, spacingAfter, spacingBeforeFields inherited from class Phrase
font, leading, markupAttributesFields inherited from class AbstractList
modCountFields inherited from interface Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, GRAPHIC, HEADER, IMGRAW, IMGTEMPLATE, JPEG, KEYWORDS, LIST, LISTITEM, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE -
Constructor Summary
ConstructorsConstructorDescriptionListItem()Constructs aListItem.ListItem(float leading) Constructs aListItemwith a certain leading.Constructs aListItemwith a certainChunkand a certain leading.Constructs aListItemwith a certainStringand a certain leading.Constructs aListItemwith a certain leading,StringandFont.Constructs aListItemwith a certainChunk.Constructs aListItemwith a certainPhrase.Constructs aListItemwith a certainString.Constructs aListItemwith a certainStringand a certainFont.ListItem(Properties attributes) Returns aListItemthat has been constructed taking in account the value of some attributes. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if a given tag corresponds with this object.Returns the listsymbol.voidsetListSymbol(Chunk symbol) Sets the listsymbol.inttype()Gets the type of the text element.Methods inherited from class Paragraph
add, alignment, getExtraParagraphSpace, getFirstLineIndent, getKeepTogether, getMultipliedLeading, indentationLeft, indentationRight, setAlignment, setAlignment, setExtraParagraphSpace, setFirstLineIndent, setIndentationLeft, setIndentationRight, setKeepTogether, setLeading, setLeading, setSpacingAfter, setSpacingBefore, spacingAfter, spacingBeforeMethods inherited from class Phrase
add, addAll, addSpecial, font, getChunks, getInstance, getInstance, getInstance, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, isEmpty, leading, leadingDefined, process, setMarkupAttribute, setMarkupAttributesMethods inherited from class ArrayList
addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class AbstractCollection
containsAll, toStringMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
containsAll, reversedMethods inherited from interface MarkupAttributes
getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, setMarkupAttribute, setMarkupAttributesMethods inherited from interface TextElementArray
add
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDA serial version UID- See Also:
-
symbol
this is the symbol that wil proceed the listitem.
-
-
Constructor Details
-
ListItem
public ListItem()Constructs aListItem. -
ListItem
public ListItem(float leading) Constructs aListItemwith a certain leading.- Parameters:
leading- the leading
-
ListItem
Constructs aListItemwith a certainChunk.- Parameters:
chunk- aChunk
-
ListItem
Constructs aListItemwith a certainString.- Parameters:
string- aString
-
ListItem
-
ListItem
Constructs aListItemwith a certainChunkand a certain leading.- Parameters:
leading- the leadingchunk- aChunk
-
ListItem
Constructs aListItemwith a certainStringand a certain leading.- Parameters:
leading- the leadingstring- aString
-
ListItem
-
ListItem
Constructs aListItemwith a certainPhrase.- Parameters:
phrase- aPhrase
-
ListItem
Returns aListItemthat has been constructed taking in account the value of some attributes.- Parameters:
attributes- Some attributes
-
-
Method Details
-
type
-
setListSymbol
-
listSymbol
-
isTag
Checks if a given tag corresponds with this object.- Parameters:
tag- the given tag- Returns:
- true if the tag corresponds
-