Class ListItem
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- 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
public class ListItem extends Paragraph implements TextElementArray, MarkupAttributes
AListItemis aParagraphthat can be added to aList.Example 1:
The result of this code looks like this: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"));- 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
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");- This is an item
- This is another item
- See Also:
Element,List,Paragraph, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.gitlab.pdftk_java.com.lowagie.text.Paragraph
alignment, indentationLeft, indentationRight, keeptogether, multipliedLeading, spacingAfter, spacingBefore
-
Fields inherited from class com.gitlab.pdftk_java.com.lowagie.text.Phrase
font, leading, markupAttributes
-
Fields inherited from class java.util.AbstractList
modCount
-
Fields inherited from interface com.gitlab.pdftk_java.com.lowagie.text.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
Constructors Constructor Description ListItem()Constructs aListItem.ListItem(float leading)Constructs aListItemwith a certain leading.ListItem(float leading, Chunk chunk)Constructs aListItemwith a certainChunkand a certain leading.ListItem(float leading, String string)Constructs aListItemwith a certainStringand a certain leading.ListItem(float leading, String string, Font font)Constructs aListItemwith a certain leading,StringandFont.ListItem(Chunk chunk)Constructs aListItemwith a certainChunk.ListItem(Phrase phrase)Constructs aListItemwith a certainPhrase.ListItem(String string)Constructs aListItemwith a certainString.ListItem(String string, Font font)Constructs aListItemwith a certainStringand a certainFont.ListItem(Properties attributes)Returns aListItemthat has been constructed taking in account the value of some attributes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanisTag(String tag)Checks if a given tag corresponds with this object.ChunklistSymbol()Returns the listsymbol.voidsetListSymbol(Chunk symbol)Sets the listsymbol.inttype()Gets the type of the text element.-
Methods inherited from class com.gitlab.pdftk_java.com.lowagie.text.Paragraph
add, alignment, getExtraParagraphSpace, getFirstLineIndent, getKeepTogether, getMultipliedLeading, indentationLeft, indentationRight, setAlignment, setAlignment, setExtraParagraphSpace, setFirstLineIndent, setIndentationLeft, setIndentationRight, setKeepTogether, setLeading, setLeading, setSpacingAfter, setSpacingBefore, spacingAfter, spacingBefore
-
Methods inherited from class com.gitlab.pdftk_java.com.lowagie.text.Phrase
add, addAll, addSpecial, font, getChunks, getInstance, getInstance, getInstance, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, isEmpty, leading, leadingDefined, process, setMarkupAttribute, setMarkupAttributes
-
Methods inherited from class java.util.ArrayList
addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface com.gitlab.pdftk_java.com.lowagie.text.Element
getChunks, process, toString
-
Methods inherited from interface java.util.List
containsAll
-
Methods inherited from interface com.gitlab.pdftk_java.com.lowagie.text.MarkupAttributes
getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, setMarkupAttribute, setMarkupAttributes
-
Methods inherited from interface com.gitlab.pdftk_java.com.lowagie.text.TextElementArray
add
-
-
-
-
Constructor Detail
-
ListItem
public ListItem()
Constructs aListItem.
-
ListItem
public ListItem(float leading)
Constructs aListItemwith a certain leading.- Parameters:
leading- the leading
-
ListItem
public ListItem(Chunk chunk)
Constructs aListItemwith a certainChunk.- Parameters:
chunk- aChunk
-
ListItem
public ListItem(String string)
Constructs aListItemwith a certainString.- Parameters:
string- aString
-
ListItem
public ListItem(String string, Font font)
Constructs aListItemwith a certainStringand a certainFont.- Parameters:
string- aStringfont- aString
-
ListItem
public ListItem(float leading, Chunk chunk)Constructs aListItemwith a certainChunkand a certain leading.- Parameters:
leading- the leadingchunk- aChunk
-
ListItem
public ListItem(float leading, String string)Constructs aListItemwith a certainStringand a certain leading.- Parameters:
leading- the leadingstring- aString
-
ListItem
public ListItem(float leading, String string, Font font)Constructs aListItemwith a certain leading,StringandFont.- Parameters:
leading- the leadingstring- aStringfont- aFont
-
ListItem
public ListItem(Phrase phrase)
Constructs aListItemwith a certainPhrase.- Parameters:
phrase- aPhrase
-
ListItem
public ListItem(Properties attributes)
Returns aListItemthat has been constructed taking in account the value of some attributes.- Parameters:
attributes- Some attributes
-
-
Method Detail
-
type
public int type()
Gets the type of the text element.
-
setListSymbol
public void setListSymbol(Chunk symbol)
Sets the listsymbol.- Parameters:
symbol- aChunk
-
listSymbol
public Chunk listSymbol()
Returns the listsymbol.- Returns:
- a
Chunk
-
isTag
public static boolean isTag(String tag)
Checks if a given tag corresponds with this object.- Parameters:
tag- the given tag- Returns:
- true if the tag corresponds
-
-