|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.pdf.elements.PdfElementBase
com.aspose.pdf.elements.Paragraph
com.aspose.pdf.elements.Heading
Represents a heading in Pdf document.
[SampleCode] Heading heading1 = new Heading(sec1,1,null,"this level1 heading"); Heading heading2 = new Heading(sec1,2,null,"this level2 heading"); Heading heading3 = new Heading(sec1,3,null,"this level3 heading"); sec1.getParagraphs().add(heading1); sec1.getParagraphs().add(heading2); sec1.getParagraphs().add(heading3);
Constructor Summary | |
Heading(Pdf pdf,
Section section,
int level)
Initializes an object of Heading class. |
Method Summary | |
Segment |
getContent()
Gets the body of the head. |
org.w3c.dom.Element |
getDOMElement()
Gets a DOM representation of the pdf element. |
int |
getHeadingLevel()
Gets an int value that indicates the level of the heading. |
int |
getHeadingType()
Gets the HeadingType of this heading. |
float |
getLabelWidth()
Gets a float value that indicates the width of the label of the heading. |
int |
getStartNumber()
Gets a int number that indicates the start number of this heading when using auto numbering. |
Segment |
getUserLabel()
Gets a string that indicates the caption label. |
boolean |
isAutoSequence()
Gets a bool value that indicates whether the number of the heading is in an automatical sequence. |
boolean |
isPrefixed()
Gets a bool value that indicates if the prefix of the number is shown when using auto sequence. |
Heading |
setContent(Segment content)
Sets the body of the head. |
Heading |
setHeadingLevel(int level)
Sets an int value that indicates the level of the heading. |
Heading |
setHeadingType(int type)
Sets the HeadingType of this heading. |
Heading |
setIsAutoSequence(boolean autoSequence)
Sets a bool value that indicates whether the number of the heading is in an automatical sequence. |
Heading |
setIsPrefixed(boolean prefixed)
Sets a bool value that indicates if the prefix of the number is shown when using auto sequence. |
Heading |
setLabelWidth(float width)
Sets a float value that indicates the width of the label of the heading. |
Heading |
setStartNumber(int number)
Sets a int number that indicates the start number of this heading when using auto numbering. |
Heading |
setUserLabel(Segment label)
Gets a string that indicates the caption label. |
Methods inherited from class com.aspose.pdf.elements.Paragraph |
clone, getLeft, getMargin, getTop, isDisabled, isFirstParagraph, isKeptTogether, isOnOddPage, setDisabled, setFirstParagraph, setKeptTogether, setLeft, setMargin, setOnOddPage, setTop |
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 |
public Heading(Pdf pdf, Section section, int level) throws AsposeBaseException
pdf
- The pdf that owns the Section.section
- The section that the Heading will inherits the text info.level
- The level of the heading.
AsposeBaseException
Method Detail |
public int getHeadingType()
HeadingType
public Heading setHeadingType(int type)
type
- The heading type to set.public boolean isAutoSequence()
public Heading setIsAutoSequence(boolean autoSequence)
public boolean isPrefixed()
public Heading setIsPrefixed(boolean prefixed)
public int getHeadingLevel()
public Heading setHeadingLevel(int level)
public int getStartNumber()
public Heading setStartNumber(int number)
number
- The start number to set.public Segment getUserLabel()
public Heading setUserLabel(Segment label)
label
- The UserLabel to set.public float getLabelWidth()
public Heading setLabelWidth(float width)
width
- The LabelWidth to set.public Segment getContent()
public Heading setContent(Segment content)
public org.w3c.dom.Element getDOMElement() throws AsposeBaseException
PdfElementBase
getDOMElement
in class Paragraph
AsposeBaseException
PdfElementBase.getDOMElement()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |