Home » iText-2.1.7 » com.lowagie » text » [javadoc | source]
com.lowagie.text
public class: ListItem [javadoc | source]
java.lang.Object
   java.util.AbstractCollection
      java.util.AbstractList
         java.util.ArrayList
            com.lowagie.text.Phrase
               com.lowagie.text.Paragraph
                  com.lowagie.text.ListItem

All Implemented Interfaces:
    TextElementArray, List, Serializable, RandomAccess, Cloneable, Collection

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:
  1. First line
  2. The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?
  3. 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:
Fields inherited from com.lowagie.text.Paragraph:
alignment,  multipliedLeading,  indentationLeft,  indentationRight,  spacingBefore,  spacingAfter,  keeptogether
Fields inherited from com.lowagie.text.Phrase:
leading,  font,  hyphenation
Fields inherited from java.util.AbstractList:
modCount
Constructor:
 public ListItem() 
 public ListItem(float leading) 
 public ListItem(Chunk chunk) 
    Constructs a ListItem with a certain Chunk.
    Parameters:
    chunk - a Chunk
 public ListItem(String string) 
    Constructs a ListItem with a certain String.
    Parameters:
    string - a String
 public ListItem(Phrase phrase) 
    Constructs a ListItem with a certain Phrase.
    Parameters:
    phrase - a Phrase
 public ListItem(String string,
    Font font) 
    Constructs a ListItem with a certain String and a certain Font.
    Parameters:
    string - a String
    font - a String
 public ListItem(float leading,
    Chunk chunk) 
    Constructs a ListItem with a certain Chunk and a certain leading.
    Parameters:
    leading - the leading
    chunk - a Chunk
 public ListItem(float leading,
    String string) 
    Constructs a ListItem with a certain String and a certain leading.
    Parameters:
    leading - the leading
    string - a String
 public ListItem(float leading,
    String string,
    Font font) 
    Constructs a ListItem with a certain leading, String and Font.
    Parameters:
    leading - the leading
    string - a String
    font - a Font
Method from com.lowagie.text.ListItem Summary:
getListSymbol,   setIndentationLeft,   setListSymbol,   type
Methods from com.lowagie.text.Paragraph:
add,   getAlignment,   getExtraParagraphSpace,   getFirstLineIndent,   getIndentationLeft,   getIndentationRight,   getKeepTogether,   getMultipliedLeading,   getSpacingAfter,   getSpacingBefore,   getTotalLeading,   setAlignment,   setAlignment,   setExtraParagraphSpace,   setFirstLineIndent,   setIndentationLeft,   setIndentationRight,   setKeepTogether,   setLeading,   setLeading,   setMultipliedLeading,   setSpacingAfter,   setSpacingBefore,   spacingAfter,   spacingBefore,   type
Methods from com.lowagie.text.Phrase:
add,   add,   addAll,   addChunk,   addSpecial,   getChunks,   getContent,   getFont,   getHyphenation,   getInstance,   getInstance,   getInstance,   getLeading,   hasLeading,   isContent,   isEmpty,   isNestable,   process,   setFont,   setHyphenation,   setLeading,   type
Methods from java.util.ArrayList:
add,   add,   addAll,   addAll,   clear,   clone,   contains,   ensureCapacity,   get,   indexOf,   isEmpty,   lastIndexOf,   remove,   remove,   removeRange,   set,   size,   toArray,   toArray,   trimToSize
Methods from java.util.AbstractList:
add,   add,   addAll,   clear,   equals,   get,   hashCode,   indexOf,   iterator,   lastIndexOf,   listIterator,   listIterator,   remove,   removeRange,   set,   subList
Methods from java.util.AbstractCollection:
add,   addAll,   clear,   contains,   containsAll,   isEmpty,   iterator,   remove,   removeAll,   retainAll,   size,   toArray,   toArray,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.ListItem Detail:
 public Chunk getListSymbol() 
    Returns the listsymbol.
 public  void setIndentationLeft(float indentation,
    boolean autoindent) 
    Sets the indentation of this paragraph on the left side.
 public  void setListSymbol(Chunk symbol) 
    Sets the listsymbol.
 public int type() 
    Gets the type of the text element.