com.lowagie.text
public class Anchor extends Phrase
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. |
| static long | serialVersionUID |
| Constructor Summary | |
|---|---|
| Anchor()
Constructs an Anchor without specifying a leading. | |
| Anchor(float leading)
Constructs an Anchor with a certain leading.
| |
| Anchor(Chunk chunk)
Constructs an Anchor with a certain Chunk.
| |
| 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(float leading, Chunk chunk)
Constructs an Anchor with a certain Chunk
and 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(Phrase phrase)
Constructs an Anchor with a certain Phrase.
| |
| Method Summary | |
|---|---|
| ArrayList | getChunks()
Gets all the chunks in this element.
|
| String | getName()
Returns the name of this Anchor.
|
| String | getReference()
Gets the reference of this Anchor.
|
| URL | getUrl()
Gets the reference of this Anchor.
|
| boolean | process(ElementListener listener)
Processes the element by adding it (or the different parts) to an
ElementListener.
|
| 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.
|
Anchor.Anchor.Anchor without specifying a leading.Anchor with a certain leading.
Parameters: leading the leading
Anchor with a certain Chunk.
Parameters: chunk a Chunk
Anchor with a certain String.
Parameters: string a String
Anchor with a certain String
and a certain Font.
Parameters: string a String font a Font
Anchor with a certain Chunk
and a certain leading.
Parameters: leading the leading chunk a Chunk
Anchor with a certain leading
and a certain String.
Parameters: leading the leading string a String
Anchor with a certain leading,
a certain String and a certain Font.
Parameters: leading the leading string a String font a Font
Anchor with a certain Phrase.
Parameters: phrase a Phrase
Returns: an ArrayList
Anchor.
Returns: a name
Anchor.
Returns: a reference
Anchor.
Returns: an URL
ElementListener.
Parameters: listener an ElementListener
Returns: true if the element was processed successfully
Anchor.
Parameters: name a new name
Anchor.
Parameters: reference a new reference
Returns: a type