org.odftoolkit.simple.text
Class TextHyperlink

java.lang.Object
  extended by org.odftoolkit.simple.Component
      extended by org.odftoolkit.simple.text.TextHyperlink

public class TextHyperlink
extends Component

This class represents a text hyperlink in ODF document. It provides convenient methods to get/set/remove the URI of hyperlinks.

Since:
0.6.5

Method Summary
static TextHyperlink getInstanceof(TextAElement aElement)
          Gets a TextHyperlink instance by an instance of TextAElement .
 OdfElement getOdfElement()
          Return the instance of OdfElement which presents this structure.
 String getTextContent()
          Get the text content of this hyperlink
 URI getURI()
          Return the URI of this hyperlink
 void removeTextContent()
          Remove the text content of this hyperlink.
 void setTextContent(String text)
          Set the text content of this hyperlink
 void setURI(URI linkto)
          Set the value of URI for this hyperlink
 
Methods inherited from class org.odftoolkit.simple.Component
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstanceof

public static TextHyperlink getInstanceof(TextAElement aElement)
Gets a TextHyperlink instance by an instance of TextAElement .

Parameters:
aElement - the instance of TextAElement.
Returns:
an instance of Hyperlink.

getOdfElement

public OdfElement getOdfElement()
Description copied from class: Component
Return the instance of OdfElement which presents this structure.

Specified by:
getOdfElement in class Component
Returns:
the instance of OdfElement

getURI

public URI getURI()
           throws URISyntaxException
Return the URI of this hyperlink

Returns:
the URI of this hyperlink
Throws:
URISyntaxException

setURI

public void setURI(URI linkto)
Set the value of URI for this hyperlink

Parameters:
linkto - - the URI of this hyperlink

getTextContent

public String getTextContent()
Get the text content of this hyperlink

Returns:
the text content of this hyperlink

setTextContent

public void setTextContent(String text)
Set the text content of this hyperlink

Parameters:
text - - the text content to be set

removeTextContent

public void removeTextContent()
Remove the text content of this hyperlink.

The other child elements except text content will not be removed.



Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.