|
com.aspose.pdf.elements
Class Heading
java.lang.Object
com.aspose.pdf.elements.PdfElementBase
com.aspose.pdf.elements.Paragraph
com.aspose.pdf.elements.Text
com.aspose.pdf.elements.Heading
- All Implemented Interfaces:
- java.lang.Cloneable
public class Heading - extends Text
Represents a heading in Pdf document.
|
Constructor Summary |
Heading(Pdf pdf,
Section section,
int level)
Initializes an object of Heading class. |
Heading(Section section)
Initializes an object of Heading class. |
|
Method Summary |
Color |
getBulletColor()
Gets a Colorvalue that indicates the color of the bullet/label. |
java.lang.String |
getBulletFontName()
Gets a string that indicates the font name for bullet. |
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. |
java.lang.String |
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 |
setBulletColor(Color bulletColor)
Sets a Color value that indicates the color of the bullet/label. |
void |
setBulletFontName(java.lang.String bulletFontName)
Sets a string that indicates the font name for bullet. |
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(java.lang.String label)
Gets a string that indicates the caption label. |
| Methods inherited from class com.aspose.pdf.elements.Text |
getFirstLineIndent, getRotatingAngle, getSegments, getTextInfo, getTextWidth, isAlignedByWord, isSpaced, setFirstLineIndent, setIsAlignedByWord, setIsSpaced, setRotatingAngle, setSegments, setTextInfo, setTextWidth |
| 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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Heading
public Heading(Pdf pdf,
Section section,
int level)
throws AsposeBaseException
- Initializes an object of Heading class.
- Parameters:
pdf - The pdf that owns the Section.section - The section that the Heading will inherits the text info.level - The level of the heading.
- Throws:
AsposeBaseException
Heading
public Heading(Section section)
throws AsposeBaseException
- Initializes an object of Heading class.
- Parameters:
section - The section that the Heading will inherits the text info.
- Throws:
AsposeBaseException
getHeadingType
public int getHeadingType()
- Gets the HeadingType of this heading. The default is HeadingType.Arab.
- Returns:
- Returns the heading type.
- See Also:
HeadingType
setHeadingType
public Heading setHeadingType(int type)
- Sets the HeadingType of this heading.
- Parameters:
type - The heading type to set.
isAutoSequence
public boolean isAutoSequence()
- Gets a bool value that indicates whether the number
of the heading is in an automatical sequence. The default value is true.
setIsAutoSequence
public Heading setIsAutoSequence(boolean autoSequence)
- Sets a bool value that indicates whether the number
of the heading is in an automatical sequence.
isPrefixed
public boolean isPrefixed()
- Gets a bool value that indicates if the prefix of the number
is shown when using auto sequence. For example,for a label "1.2.5",
if this property is set to false, the label will be "5". The default value is true.
setIsPrefixed
public Heading setIsPrefixed(boolean prefixed)
- Sets a bool value that indicates if the prefix of the number
is shown when using auto sequence. For example,for a label "1.2.5",
if this property is set to false, the label will be "5".
getHeadingLevel
public int getHeadingLevel()
- Gets an int value that indicates the level of the heading.
- Returns:
- Returns the level.
setHeadingLevel
public Heading setHeadingLevel(int level)
- Sets an int value that indicates the level of the heading.
- Parameters:
level - The level to set.
getStartNumber
public int getStartNumber()
- Gets a int number that indicates the start number of this heading when using auto numbering.
- Returns:
- Returns the Start number.
setStartNumber
public Heading setStartNumber(int number)
- Sets a int number that indicates the start number of this heading when using auto numbering.
- Parameters:
number - The start number to set.
getUserLabel
public java.lang.String getUserLabel()
- Gets a string that indicates the caption label. For example, UserLabel="1.3.5".
Set this property to 'bullet1','bullet2'...'bullet7' to use system-defined bullet.
To use user defined lebel, Set the BulletFontName to "Symbol" and "ZapfDingbats"
and set this property to the char value of the bullt symbol. For example,
UserLable="44" and BulletFontName="ZapfDingbats".
- Returns:
- Returns the UserLabel.
setUserLabel
public Heading setUserLabel(java.lang.String label)
- Gets a string that indicates the caption label. For example, UserLabel="1.3.5".
Set this property to 'bullet1','bullet2'...'bullet7' to use system-defined bullet.
To use user defined lebel, Set the BulletFontName to "Symbol" and "ZapfDingbats"
and set this property to the char value of the bullt symbol. For example,
UserLable="44" and BulletFontName="ZapfDingbats".
- Parameters:
label - The UserLabel to set.
getLabelWidth
public float getLabelWidth()
- Gets a float value that indicates the width of the label of the heading.
- Returns:
- Returns the LabelWidth.
setLabelWidth
public Heading setLabelWidth(float width)
- Sets a float value that indicates the width of the label of the heading.
- Parameters:
width - The LabelWidth to set.
getBulletColor
public Color getBulletColor()
- Gets a Colorvalue that indicates the color of the bullet/label.
setBulletColor
public Heading setBulletColor(Color bulletColor)
- Sets a Color value that indicates the color of the bullet/label.
getBulletFontName
public java.lang.String getBulletFontName()
- Gets a string that indicates the font name for bullet. "Symbol" and "ZapfDingbats" are supported.
setBulletFontName
public void setBulletFontName(java.lang.String bulletFontName)
- Sets a string that indicates the font name for bullet. "Symbol" and "ZapfDingbats" are supported.
- Parameters:
bulletFontName - the bulletfont name you want to set
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 Text
- Throws:
AsposeBaseException- See Also:
PdfElementBase.getDOMElement()
|