|
com.aspose.pdf.elements
Class Segment
java.lang.Object
com.aspose.pdf.elements.PdfElementBase
com.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(Heading heading)
Initializes a new instance of the Segment class. |
Segment(Heading heading,
java.lang.String content)
Initializes a new instance of the Segment class. |
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(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. |
int |
getAction()
|
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. |
java.lang.String |
getJavaScript()
Gets the javascript that will be executed when the text is clicked. |
boolean |
getSymbolReplaceable()
Gets a boolean value that indicates whether a symbol like #$TAB is replaceable or not. |
TextInfo |
getTextInfo()
Gets a TextInfo object that indicates the text info of the segment. |
Segment |
setAction(int action)
Sets an action to happen. |
void |
setAttachment(Attachment atta)
Sets the attachment for this Segment. |
Segment |
setContent(java.lang.String content)
Sets a string that indicates the content of the text segment. |
Segment |
setHyperLink(HyperLink link)
Sets a Hyperlink object that indicates the hyper link info of the segment. |
void |
setJavaScript(java.lang.String javaScript)
Sets the javascript that will be executed when the text is clicked. |
void |
setSymbolReplaceable(boolean symbolReplaceable)
Sets a boolean value that indicates whether a symbol like #$TAB is replaceable or not. |
Segment |
setTextInfo(TextInfo textInfo)
Sets a TextInfo object that indicates the text info of the segment. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Segment
public Segment(Text parentText)
- Initializes a new instance of the Segment class.
- Parameters:
parentText - The text that owns Segment.
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:
parentList - The text that owns Segment.content - The content string of the segment.
Segment
public Segment(Heading heading,
java.lang.String content)
- Initializes a new instance of the Segment class.
- Parameters:
heading - The text that owns Segment.content - The content string of the segment.
Segment
public Segment(Heading heading)
- Initializes a new instance of the Segment class.
- Parameters:
heading - The text that owns 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 -
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:
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 Segment 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 Segment 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 Segment setHyperLink(HyperLink link)
- Sets a Hyperlink object that indicates the hyper link info of the segment.
getAction
public int getAction()
- Returns:
- Returns the action.
setAction
public Segment setAction(int action)
- Sets an action to happen.
- Parameters:
action - The action to set.- See Also:
ActionType
getJavaScript
public java.lang.String getJavaScript()
- Gets the javascript that will be executed when the text is clicked.
setJavaScript
public void setJavaScript(java.lang.String javaScript)
- Sets the javascript that will be executed when the text is clicked.
setAttachment
public void setAttachment(Attachment atta)
- Sets the attachment for this Segment. Set attachment in this way, the attachment will
attach to the Segment, you don't have to specify the absolute position.
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()
getSymbolReplaceable
public boolean getSymbolReplaceable()
- Gets a boolean value that indicates whether a symbol like #$TAB is replaceable or not. Default is true.
setSymbolReplaceable
public void setSymbolReplaceable(boolean symbolReplaceable)
- Sets a boolean value that indicates whether a symbol like #$TAB is replaceable or not.
|