com.lowagie.text
Class Anchor
- Element, TextElementArray
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");
static String | ANCHOR- This is the anchor tag.
|
protected String | name- This is the name of the
Anchor.
|
protected String | reference- This is the reference of the
Anchor.
|
private static long | serialVersionUID
|
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 |
Anchor()- Constructs an
Anchor without specifying a leading.
|
Anchor(Properties attributes)- Returns an
Anchor that has been constructed taking in account
the value of some attributes.
|
Anchor(String string)- Constructs an
Anchor with a certain String.
|
Anchor(String string, Font font)- Constructs an
Anchor with a certain String
and a certain Font.
|
Anchor(Chunk chunk)- Constructs an
Anchor with a certain Chunk.
|
Anchor(float leading)- Constructs an
Anchor with a certain leading.
|
Anchor(float leading, String string)- Constructs an
Anchor with a certain leading
and a certain String.
|
Anchor(float leading, String string, Font font)- Constructs an
Anchor with a certain leading,
a certain String and a certain Font.
|
Anchor(float leading, Chunk chunk)- Constructs an
Anchor with a certain Chunk
and a certain leading.
|
ArrayList | getChunks()- Gets all the chunks in this element.
|
Iterator | getElements()- Gets an iterator of
Elements.
|
static boolean | isTag(String tag)- Checks if a given tag corresponds with this object.
|
String | name()- Returns the name of this
Anchor.
|
boolean | process(ElementListener listener)- Processes the element by adding it (or the different parts) to an
ElementListener.
|
String | reference()- Gets the reference of this
Anchor.
|
void | setName(String name)- Sets the name of this
Anchor.
|
void | setReference(String reference)- Sets the reference of this
Anchor.
|
int | type()- Gets the type of the text element.
|
URL | url()- Gets the reference of this
Anchor.
|
add, add, addAll, addChunk, addSpecial, content, font, getChunks, getInstance, getInstance, getInstance, isEmpty, isTag, leading, leadingDefined, process, setLeading, type |
ANCHOR
public static final String ANCHOR
This is the anchor tag.
name
protected String name
This is the name of the Anchor.
reference
protected String reference
This is the reference of the Anchor.
serialVersionUID
private static final long serialVersionUID
Anchor
public Anchor()
Constructs an Anchor without specifying a leading.
Anchor
public Anchor(Properties attributes)
Returns an Anchor that has been constructed taking in account
the value of some attributes.
attributes - Some attributes
Anchor
public Anchor(String string)
Constructs an Anchor with a certain String.
Anchor
public Anchor(String string,
Font font) Constructs an Anchor with a certain String
and a certain Font.
string - a Stringfont - a Font
Anchor
public Anchor(Chunk chunk)
Constructs an Anchor with a certain Chunk.
Anchor
public Anchor(float leading)
Constructs an Anchor with a certain leading.
Anchor
public Anchor(float leading,
String string) Constructs an Anchor with a certain leading
and a certain String.
leading - the leadingstring - a String
Anchor
public Anchor(float leading,
String string,
Font font) Constructs an Anchor with a certain leading,
a certain String and a certain Font.
leading - the leadingstring - a Stringfont - a Font
Anchor
public Anchor(float leading,
Chunk chunk) Constructs an Anchor with a certain Chunk
and a certain leading.
leading - the leadingchunk - a Chunk
getElements
public Iterator getElements()
Gets an iterator of Elements.
isTag
public static boolean isTag(String tag)
Checks if a given tag corresponds with this object.
- isTag in interface Phrase
- true if the tag corresponds
name
public String name()
Returns the name of this Anchor.
process
public boolean process(ElementListener listener)
Processes the element by adding it (or the different parts) to an
ElementListener.
- process in interface Element
- process in interface Phrase
listener - an ElementListener
true if the element was processed successfully
reference
public String reference()
Gets the reference of this Anchor.
setName
public void setName(String name)
Sets the name of this Anchor.
setReference
public void setReference(String reference)
Sets the reference of this Anchor.
reference - a new reference
type
public int type()
Gets the type of the text element.
- type in interface Element
- type in interface Phrase
url
public URL url()
Gets the reference of this Anchor.