com.lowagie.text
Class ListItem
- Element, TextElementArray
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
Example 2:
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
ALIGN_BASELINE , ALIGN_BOTTOM , ALIGN_CENTER , ALIGN_JUSTIFIED , ALIGN_JUSTIFIED_ALL , ALIGN_LEFT , ALIGN_MIDDLE , ALIGN_RIGHT , ALIGN_TOP , ALIGN_UNDEFINED , ANCHOR , ANNOTATION , AUTHOR , CCITTG3_1D , CCITTG3_2D , CCITTG4 , CCITT_BLACKIS1 , CCITT_ENCODEDBYTEALIGN , CCITT_ENDOFBLOCK , CCITT_ENDOFLINE , CELL , CHAPTER , CHUNK , CREATIONDATE , CREATOR , HEADER , IMGRAW , IMGTEMPLATE , JPEG , KEYWORDS , LIST , LISTITEM , MARKED , MULTI_COLUMN_TEXT , PARAGRAPH , PHRASE , PRODUCER , PTABLE , RECTANGLE , ROW , SECTION , SUBJECT , TABLE , TITLE |
ListItem() - Constructs a
ListItem .
|
ListItem(Properties attributes) - Returns a
ListItem that has been constructed taking in account
the value of some attributes.
|
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 .
|
ListItem(Chunk chunk) - Constructs a
ListItem with a certain Chunk .
|
ListItem(Phrase phrase) - Constructs a
ListItem with a certain Phrase .
|
ListItem(float leading) - Constructs a
ListItem with 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(float leading, Chunk chunk) - Constructs a
ListItem with a certain Chunk
and a certain leading.
|
static boolean | isTag(String tag) - Checks if a given tag corresponds with this object.
|
Chunk | listSymbol() - 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 , alignment , getExtraParagraphSpace , getFirstLineIndent , getKeepTogether , getMultipliedLeading , getTotalLeading , indentationLeft , indentationRight , isTag , setAlignment , setAlignment , setExtraParagraphSpace , setFirstLineIndent , setIndentationLeft , setIndentationRight , setKeepTogether , setLeading , setLeading , setSpacingAfter , setSpacingBefore , spacingAfter , spacingBefore , type |
add , add , addAll , addChunk , addSpecial , content , font , getChunks , getInstance , getInstance , getInstance , isEmpty , isTag , leading , leadingDefined , process , setLeading , type |
serialVersionUID
private static final long serialVersionUID
symbol
private Chunk symbol
this is the symbol that wil proceed the listitem.
ListItem
public ListItem()
Constructs a ListItem
.
ListItem
public ListItem(Properties attributes)
Returns a ListItem
that has been constructed taking in account
the value of some attributes.
attributes
- Some attributes
ListItem
public ListItem(String string)
Constructs a ListItem
with a certain String
.
ListItem
public ListItem(String string,
Font font)
Constructs a ListItem
with a certain String
and a certain Font
.
string
- a String
font
- a String
ListItem
public ListItem(Chunk chunk)
Constructs a ListItem
with a certain Chunk
.
ListItem
public ListItem(Phrase phrase)
Constructs a ListItem
with a certain Phrase
.
ListItem
public ListItem(float leading)
Constructs a ListItem
with a certain leading.
ListItem
public ListItem(float leading,
String string)
Constructs a ListItem
with a certain String
and a certain leading.
leading
- the leadingstring
- a String
ListItem
public ListItem(float leading,
String string,
Font font)
Constructs a ListItem
with a certain leading, String
and Font
.
leading
- the leadingstring
- a String
font
- a Font
ListItem
public ListItem(float leading,
Chunk chunk)
Constructs a ListItem
with a certain Chunk
and a certain leading.
leading
- the leadingchunk
- a Chunk
isTag
public static boolean isTag(String tag)
Checks if a given tag corresponds with this object.
- isTag in interface Paragraph
- true if the tag corresponds
listSymbol
public Chunk listSymbol()
Returns the listsymbol.
setIndentationLeft
public void setIndentationLeft(float indentation,
boolean autoindent)
Sets the indentation of this paragraph on the left side.
indentation
- the new indentation
setListSymbol
public void setListSymbol(Chunk symbol)
Sets the listsymbol.