com.aspose.pdf.elements
Class Segment

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

public class Segment
extends PdfElementBase

Represents a segment in a Text paragraph.


Constructor Summary
Segment(List parentList, java.lang.String content)
          Initializes a new instance of the Segment class.
Segment(Section section)
          Initializes a new instance of the Segment class.
Segment(Section section, java.lang.String content)
          Initializes a new instance of the Segment class.
Segment(Text parentText)
          Initializes a new instance of the Segment class.
Segment(Text parentText, java.lang.String content)
          Initializes a new instance of the Segment class.
 
Method Summary
 java.lang.Object clone()
          Clone an object.
 java.lang.String getContent()
          Gets a string that indicates the content of the text segment.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 HyperLink getHyperLink()
          Gets a Hyperlink object that indicates the hyper link info of the segment.
 TextInfo getTextInfo()
          Gets a TextInfo object that indicates the text info of the segment.
 void setContent(java.lang.String content)
          Sets a string that indicates the content of the text segment.
 void setHyperLink(HyperLink link)
          Sets a Hyperlink object that indicates the hyper link info of the segment.
 void setTextInfo(TextInfo textInfo)
          Sets a TextInfo object that indicates the text info of the segment.
 
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

Segment

public Segment(Text parentText)
Initializes a new instance of the Segment class.

Parameters:
parentText - The text that owns Segment.

Segment

public Segment(Section section,
               java.lang.String content)
Initializes a new instance of the Segment class.


Segment

public Segment(Text parentText,
               java.lang.String content)
Initializes a new instance of the Segment class.

Parameters:
parentText - The text that owns Segment.
content - The content string of the segment.

Segment

public Segment(List parentList,
               java.lang.String content)
Initializes a new instance of the Segment class.

Parameters:
content - The content string of the segment.

Segment

public Segment(Section section)
Initializes a new instance of the Segment class. This constructor can inherit common property values from the specified Section object.

Parameters:
section -
Method Detail

clone

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

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

getContent

public java.lang.String getContent()
Gets a string that indicates the content of the text segment.

Returns:
Returns the content.

setContent

public void setContent(java.lang.String content)
Sets a string that indicates the content of the text segment.

Parameters:
content - The content to set.

getTextInfo

public TextInfo getTextInfo()
Gets a TextInfo object that indicates the text info of the segment.

Returns:
The TextInfo.

setTextInfo

public void setTextInfo(TextInfo textInfo)
Sets a TextInfo object that indicates the text info of the segment.

Parameters:
textInfo -

getHyperLink

public HyperLink getHyperLink()
Gets a Hyperlink object that indicates the hyper link info of the segment.


setHyperLink

public void setHyperLink(HyperLink link)
Sets a Hyperlink object that indicates the hyper link info of the segment.


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 PdfElementBase
Throws:
AsposeBaseException
See Also:
PdfElementBase.getDOMElement()