public class ListItem extends Paragraph
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:
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:
Element,
List,
Paragraph,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected Chunk |
symbol
this is the symbol that will precede the listitem.
|
alignment, indentationLeft, indentationRight, keeptogether, multipliedLeading, spacingAfter, spacingBeforefont, hyphenation, leadingmodCountALIGN_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, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK| Constructor and Description |
|---|
ListItem()
Constructs a
ListItem. |
ListItem(Chunk chunk)
Constructs a
ListItem with a certain Chunk. |
ListItem(float leading)
Constructs a
ListItem with a certain leading. |
ListItem(float leading,
Chunk chunk)
Constructs a
ListItem with a certain Chunk
and a certain leading. |
ListItem(float leading,
String string)
Constructs a
ListItem with a certain String
and a certain leading. |
ListItem(float leading,
String string,
Font font)
Constructs a
ListItem with a certain leading, String
and Font. |
ListItem(Phrase phrase)
Constructs a
ListItem with a certain Phrase. |
ListItem(String string)
Constructs a
ListItem with a certain String. |
ListItem(String string,
Font font)
Constructs a
ListItem with a certain String
and a certain Font. |
| Modifier and Type | Method and Description |
|---|---|
Chunk |
getListSymbol()
Returns the listsymbol.
|
void |
setIndentationLeft(float indentation,
boolean autoindent)
Sets the indentation of this paragraph on the left side.
|
void |
setListSymbol(Chunk symbol)
Sets the listsymbol.
|
int |
type()
Gets the type of the text element.
|
add, getAlignment, getExtraParagraphSpace, getFirstLineIndent, getIndentationLeft, getIndentationRight, getKeepTogether, getMultipliedLeading, getSpacingAfter, getSpacingBefore, getTotalLeading, setAlignment, setAlignment, setExtraParagraphSpace, setFirstLineIndent, setIndentationLeft, setIndentationRight, setKeepTogether, setLeading, setLeading, setMultipliedLeading, setSpacingAfter, setSpacingBefore, spacingAfter, spacingBeforeadd, add, addAll, addChunk, addSpecial, getChunks, getContent, getFont, getHyphenation, getInstance, getInstance, getInstance, getLeading, hasLeading, isContent, isEmpty, isNestable, process, setFont, setHyphenationaddAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streamprotected Chunk symbol
public ListItem()
ListItem.public ListItem(float leading)
ListItem with a certain leading.leading - the leadingpublic ListItem(Chunk chunk)
ListItem with a certain Chunk.chunk - a Chunkpublic ListItem(String string)
ListItem with a certain String.string - a Stringpublic ListItem(String string, Font font)
ListItem with a certain String
and a certain Font.string - a Stringfont - a Stringpublic ListItem(float leading,
Chunk chunk)
ListItem with a certain Chunk
and a certain leading.leading - the leadingchunk - a Chunkpublic ListItem(float leading,
String string)
ListItem with a certain String
and a certain leading.leading - the leadingstring - a Stringpublic ListItem(float leading,
String string,
Font font)
ListItem with a certain leading, String
and Font.leading - the leadingstring - a Stringfont - a Fontpublic ListItem(Phrase phrase)
ListItem with a certain Phrase.phrase - a Phrasepublic int type()
public void setListSymbol(Chunk symbol)
symbol - a Chunkpublic void setIndentationLeft(float indentation,
boolean autoindent)
indentation - the new indentationpublic Chunk getListSymbol()
ChunkCopyright © 2019. All rights reserved.