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 | |
---|---|
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 . |
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(Properties attributes)
Returns an Anchor that has been constructed taking in account
the value of some attributes.
|
Method Summary | |
---|---|
ArrayList | getChunks()
Gets all the chunks in this element.
|
Iterator | getElements()
Gets an iterator of Element s.
|
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 .
|
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
that has been constructed taking in account
the value of some attributes.
Parameters: attributes Some attributes
Returns: an ArrayList
Element
s.
Returns: an Iterator
Parameters: tag the given tag
Returns: true if the tag corresponds
Anchor
.
Returns: a name
ElementListener
.
Parameters: listener an ElementListener
Returns: true
if the element was processed successfully
Anchor
.
Returns: a reference
Anchor
.
Parameters: name a new name
Anchor
.
Parameters: reference a new reference
Returns: a type
Anchor
.
Returns: an URL