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");
Element,
Phrase,
Serialized FormmodCountALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK| Constructor and Description |
|---|
Anchor()
Constructs an
Anchor without specifying a leading. |
Anchor(Phrase phrase)
Constructs an
Anchor with a certain Phrase. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
add, add, addAll, addSpecial, getContent, getFont, getHyphenation, getLeading, isContent, isEmpty, isNestable, setFont, setHyphenation, setLeadingaddAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic Anchor()
Anchor without specifying a leading.public Anchor(Phrase phrase)
Anchor with a certain Phrase.phrase - a Phrasepublic boolean process(ElementListener listener)
ElementListener.public ArrayList getChunks()
public int type()
public void setName(String name)
Anchor.name - a new namepublic void setReference(String reference)
Anchor.reference - a new referencepublic String getName()
Anchor.public String getReference()
Anchor.public URL getUrl()
Anchor.URLCopyright © 2021. All rights reserved.