Class ListItem
java.lang.Object
java.util.AbstractCollection<Element>
java.util.AbstractList<Element>
java.util.ArrayList<Element>
com.lowagie.text.Phrase
com.lowagie.text.Paragraph
com.lowagie.text.ListItem
- All Implemented Interfaces:
Element, TextElementArray, Serializable, Cloneable, Iterable<Element>, Collection<Element>, List<Element>, RandomAccess, SequencedCollection<Element>
Deprecated.
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 longDeprecated.protected ChunkDeprecated.this is the symbol that will precede the listitem.Fields inherited from class Paragraph
alignment, indentationLeft, indentationRight, keeptogether, multipliedLeading, runDirection, spacingAfter, spacingBeforeFields inherited from class Phrase
font, hyphenation, leadingFields 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, FOOTNOTE, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MODIFICATIONDATE, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK -
Constructor Summary
ConstructorsConstructorDescriptionListItem()Deprecated.Constructs aListItem.ListItem(float leading) Deprecated.Constructs aListItemwith a certain leading.Deprecated.Constructs aListItemwith a certainChunkand a certain leading.Deprecated.Constructs aListItemwith a certainStringand a certain leading.Deprecated.Constructs aListItemwith a certain leading,StringandFont.Deprecated.Constructs aListItemwith a certainChunk.Deprecated.Constructs aListItemwith a certainPhrase.Deprecated.Constructs aListItemwith a certainString.Deprecated.Constructs aListItemwith a certainStringand a certainFont. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the listsymbol.voidsetIndentationLeft(float indentation, boolean autoindent) Deprecated.Sets the indentation of this paragraph on the left side.voidsetListSymbol(Chunk symbol) Deprecated.Sets the listsymbol.inttype()Deprecated.Gets the type of the text element.Methods inherited from class Paragraph
add, getAlignment, getExtraParagraphSpace, getFirstLineIndent, getIndentationLeft, getIndentationRight, getKeepTogether, getMultipliedLeading, getRunDirection, getSpacingAfter, getSpacingBefore, getTotalLeading, setAlignment, setAlignment, setExtraParagraphSpace, setFirstLineIndent, setIndentationLeft, setIndentationRight, setKeepTogether, setLeading, setLeading, setMultipliedLeading, setRunDirection, setSpacingAfter, setSpacingBeforeMethods inherited from class Phrase
add, add, addAll, addChunk, addSpecial, getChunks, getContent, getFont, getHyphenation, getInstance, getInstance, getInstance, getLeading, hasLeading, isContent, isEmpty, isNestable, process, setFont, setHyphenationMethods 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, reversed
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDDeprecated.- See Also:
-
symbol
Deprecated.this is the symbol that will precede the listitem.- Since:
- 5.0 used to be private
-
-
Constructor Details
-
ListItem
public ListItem()Deprecated.Constructs aListItem. -
ListItem
public ListItem(float leading) Deprecated.Constructs aListItemwith a certain leading.- Parameters:
leading- the leading
-
ListItem
Deprecated.Constructs aListItemwith a certainChunk.- Parameters:
chunk- aChunk
-
ListItem
Deprecated.Constructs aListItemwith a certainString.- Parameters:
string- aString
-
ListItem
-
ListItem
Deprecated.Constructs aListItemwith a certainChunkand a certain leading.- Parameters:
leading- the leadingchunk- aChunk
-
ListItem
Deprecated.Constructs aListItemwith a certainStringand a certain leading.- Parameters:
leading- the leadingstring- aString
-
ListItem
-
ListItem
Deprecated.Constructs aListItemwith a certainPhrase.- Parameters:
phrase- aPhrase
-
-
Method Details
-
type
-
setIndentationLeft
public void setIndentationLeft(float indentation, boolean autoindent) Deprecated.Sets the indentation of this paragraph on the left side.- Parameters:
indentation- the new indentationautoindent- if auto indentation, if set astrueindentationwill not be used
-
getListSymbol
-
setListSymbol
Deprecated.Sets the listsymbol.- Parameters:
symbol- aChunk
-