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

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

An Anchor can be a reference or a destination of a reference.

An Anchor is a special kind of Phrase. It is constructed in the same way.

Example:

Anchor anchor = new Anchor("this is a link");
anchor.setName("LINK");
anchor.setReference("http://www.lowagie.com");
Field Summary
protected  String name    This is the name of the Anchor
protected  String reference    This is the reference of the Anchor
Fields inherited from com.lowagie.text.Phrase:
leading,  font,  hyphenation
Fields inherited from java.util.AbstractList:
modCount
Constructor:
 public Anchor() 
 public Anchor(float leading) 
 public Anchor(Chunk chunk) 
    Constructs an Anchor with a certain Chunk.
    Parameters:
    chunk - a Chunk
 public Anchor(String string) 
    Constructs an Anchor with a certain String.
    Parameters:
    string - a String
 public Anchor(Phrase phrase) 
    Constructs an Anchor with a certain Phrase.
    Parameters:
    phrase - a Phrase
 public Anchor(String string,
    Font font) 
    Constructs an Anchor with a certain String and a certain Font.
    Parameters:
    string - a String
    font - a Font
 public Anchor(float leading,
    Chunk chunk) 
    Constructs an Anchor with a certain Chunk and a certain leading.
    Parameters:
    leading - the leading
    chunk - a Chunk
 public Anchor(float leading,
    String string) 
    Constructs an Anchor with a certain leading and a certain String.
    Parameters:
    leading - the leading
    string - a String
 public Anchor(float leading,
    String string,
    Font font) 
    Constructs an Anchor with a certain leading, a certain String and a certain Font.
    Parameters:
    leading - the leading
    string - a String
    font - a Font
Method from com.lowagie.text.Anchor Summary:
getChunks,   getName,   getReference,   getUrl,   process,   setName,   setReference,   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.Anchor Detail:
 public ArrayList getChunks() 
    Gets all the chunks in this element.
 public String getName() 
    Returns the name of this Anchor.
 public String getReference() 
    Gets the reference of this Anchor.
 public URL getUrl() 
    Gets the reference of this Anchor.
 public boolean process(ElementListener listener) 
    Processes the element by adding it (or the different parts) to an ElementListener.
 public  void setName(String name) 
    Sets the name of this Anchor.
 public  void setReference(String reference) 
    Sets the reference of this Anchor.
 public int type() 
    Gets the type of the text element.