public class ListItem extends Paragraph implements TextElementArray, MarkupAttributes
ListItem
is a Paragraph
that can be added to a List
.
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"));
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");
Element
,
List
,
Paragraph
,
Serialized FormModifier and Type | Field and Description |
---|---|
private Chunk |
symbol
this is the symbol that wil proceed the listitem.
|
alignment, indentationLeft, indentationRight, keeptogether, multipliedLeading, spacingAfter, spacingBefore
font, leading, markupAttributes
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 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,
java.lang.String string)
Constructs a
ListItem with a certain String
and a certain leading. |
ListItem(float leading,
java.lang.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(java.util.Properties attributes)
Returns a
ListItem that has been constructed taking in account
the value of some attributes. |
ListItem(java.lang.String string)
Constructs a
ListItem with a certain String . |
ListItem(java.lang.String string,
Font font)
Constructs a
ListItem with a certain String
and a certain Font . |
Modifier and Type | Method and Description |
---|---|
static boolean |
isTag(java.lang.String tag)
Checks if a given tag corresponds with this object.
|
Chunk |
listSymbol()
Returns the listsymbol.
|
void |
setListSymbol(Chunk symbol)
Sets the listsymbol.
|
int |
type()
Gets the type of the text element.
|
add, alignment, getExtraParagraphSpace, getFirstLineIndent, getKeepTogether, getMultipliedLeading, indentationLeft, indentationRight, setAlignment, setAlignment, setExtraParagraphSpace, setFirstLineIndent, setIndentationLeft, setIndentationRight, setKeepTogether, setLeading, setLeading, setSpacingAfter, setSpacingBefore, spacingAfter, spacingBefore
add, addAll, addSpecial, content, font, getChunks, getInstance, getInstance, getInstance, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, isEmpty, leading, leadingDefined, process, setMarkupAttribute, setMarkupAttributes
addAll, clear, clone, contains, ensureCapacity, get, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
add
getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, setMarkupAttribute, setMarkupAttributes
private 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 Chunk
public ListItem(java.lang.String string)
ListItem
with a certain String
.string
- a String
public ListItem(java.lang.String string, Font font)
ListItem
with a certain String
and a certain Font
.string
- a String
font
- a String
public ListItem(float leading, Chunk chunk)
ListItem
with a certain Chunk
and a certain leading.leading
- the leadingchunk
- a Chunk
public ListItem(float leading, java.lang.String string)
ListItem
with a certain String
and a certain leading.leading
- the leadingstring
- a String
public ListItem(float leading, java.lang.String string, Font font)
ListItem
with a certain leading, String
and Font
.leading
- the leadingstring
- a String
font
- a Font
public ListItem(Phrase phrase)
ListItem
with a certain Phrase
.phrase
- a Phrase
public ListItem(java.util.Properties attributes)
ListItem
that has been constructed taking in account
the value of some attributes.attributes
- Some attributespublic int type()
public void setListSymbol(Chunk symbol)
symbol
- a Chunk
public Chunk listSymbol()
Chunk
public static boolean isTag(java.lang.String tag)
tag
- the given tag