Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.elements
Class HyperLinkToWeb

java.lang.Object
  extended bycom.aspose.pdf.elements.PdfElementBase
      extended bycom.aspose.pdf.elements.HyperLink
          extended bycom.aspose.pdf.elements.HyperLinkToWeb
All Implemented Interfaces:
java.lang.Cloneable

public class HyperLinkToWeb
extends HyperLink

Represents a link in a Pdf document that links to web.


Constructor Summary
HyperLinkToWeb(Segment segment, java.lang.String url)
          Initializes a new instance of the HyperlinkToWeb class.
 
Method Summary
 java.lang.Object clone()
          Clone an object.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 java.lang.String getUrl()
          Gets a string that indicates the link url.
 void setUrl(java.lang.String url)
          Sets a string that indicates the link url.
 
Methods inherited from class com.aspose.pdf.elements.PdfElementBase
getElementFactory, getID, getNameIndex, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HyperLinkToWeb

public HyperLinkToWeb(Segment segment,
                      java.lang.String url)
Initializes a new instance of the HyperlinkToWeb class.

 [SampleCode]
 Pdf pdf = new Pdf();
 Section sec1 = pdf.getSections().add();
 Text text3 = new Text(sec1);
 Segment seg3 = text3.getSegments().add("a link to homepage of aspose pdf.");
 seg3.getTextInfo().setTextColor(Color.Blue);
 seg3.getTextInfo().setUnderLine(true);
 HyperLink linkToInternet = new HyperLinkToWeb(seg3,"http://www.aspose.com/Products/Aspose.Pdf/default.aspx");
 seg3.setHyperLink(linkToInternet);
 sec1.getParagraphs().add(text3);
 

Parameters:
segment - The segment that owns the hyperlink.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: PdfElementBase
Clone an object.

Overrides:
clone in class HyperLink
Throws:
java.lang.CloneNotSupportedException
See Also:
java.lang.Object#clone()

getDOMElement

public org.w3c.dom.Element getDOMElement()
                                  throws AsposeBaseException
Description copied from class: PdfElementBase
Gets a DOM representation of the pdf element.

Overrides:
getDOMElement in class HyperLink
Throws:
AsposeBaseException
See Also:
PdfElementBase.getDOMElement()

getUrl

public java.lang.String getUrl()
Gets a string that indicates the link url.


setUrl

public void setUrl(java.lang.String url)
Sets a string that indicates the link url.