com.aspose.slides
Class Paragraph

java.lang.Object
  extended by com.aspose.slides.Paragraph

public final class Paragraph
extends java.lang.Object

Represents the paragraph of a text.


Constructor Summary
Paragraph()
          Initializes a new instance of the Paragraph class.
Paragraph(Paragraph para)
          Initializes a new instance of the Paragraph class.
 
Method Summary
 boolean equalFormatting(Paragraph para)
          Determines whether the paragraphs have the same formatting.
 int getAlignment()
          Returns the alignment of a paragraph.
 char getBulletCharacter()
          Returns the character which is used for a paragraph's bullet.
 java.awt.Color getBulletColor()
          Returns the color of a paragraph's bullet.
 short getBulletColorIndex()
          Returns the index of a bulet's color in a color scheme or (-1) for scheme-independent color.
 int getBulletFontIndex()
          Returns the font index of a paragraph's bullet.
 short getBulletHeight()
          Returns the bullet size relatively to the size of the first portion in the paragraph.
 short getBulletOffset()
          Returns the offset of a paragraph's bullet.
 int getBulletType()
          Returns the type of a bullet.
 short getDepth()
          Returns the depth of a paragraph.
 boolean getHasBullet()
          Determines whether the paragraph has a bullet.
 short getNumberedBulletStartWith()
           Returns the beginning value of a numbered bullet.
 int getNumberedBulletStyle()
           Returns the style of a numbered bullet.
 short getPictureBulletId()
          Returns the Id of a PictureBullet.
 Portions getPortions()
          Returns the collection of text portions.
 int getRawAlignment()
           Returns the alignment of a paragraph.
 char getRawBulletCharacter()
          Returns the raw character which is used for bullets in a paragraph.
 java.awt.Color getRawBulletColor()
          Returns the raw color of a bullet.
 int getRawBulletFontIndex()
          Returns the raw font of a bullet.
 short getRawBulletHeight()
          Returns the raw bullet size relative to the size of the first portion of a paragraph.
 short getRawBulletOffset()
          Returns the raw offset of a bullet.
 short getRawNumberedBulletStartWith()
          Returns the raw beginning value of a numbered bullet.
 int getRawNumberedBulletStyle()
          Returns the raw style of a numbered bullet.
 short getRawPictureBulletId()
          Returns the Id of a PictureBullet.
 short getRawSpaceAfter()
          Returns the raw amount of space after the last line of a paragraphPositive value means space defined in percents of line.
 short getRawSpaceBefore()
          Returns the raw amount of space before the first line of a paragraph.
 short getRawSpaceWithin()
          Returns the raw amount of space between base lines of a paragraph.
 int getRawTextDirection()
          Returns the raw direction of a text in a paragraph.
 short getRawTextOffset()
          Returns the raw offset of a text.
 short getSpaceAfter()
          Returns the amount of space after the last line of a paragraph, in percents of line.
 short getSpaceBefore()
          Returns the amount of space before the first line of a paragraph, in percents of line.
 short getSpaceWithin()
           Returns the amount of space between base lines of a paragraph, in percents of line.
 java.lang.String getText()
          Returns the plain text of a paragraph.
 short getTextOffset()
          Returns the offset of a paragraph's text.
 boolean isBulletHardColor()
          Determines whether the bullet uses own color.
 boolean isBulletHardFont()
          Determines whether the bullet uses own font.
 boolean isBulletHardSize()
          Determines whether the bullet has own size.
 boolean isExtendedBullet()
          Returns (true) if paragraph has extended bullets (image or numbered).
 void setAlignment(int value)
          Sets the alignment of a paragraph.
 void setBulletCharacter(char value)
          Sets the character which is used for a paragraph's bullet.
 void setBulletColor(java.awt.Color value)
          Sets the color of a paragraph's bullet.
 void setBulletColorIndex(short value)
          Sets the index of a bulet's color in a color scheme or (-1) for scheme-independent color.
 void setBulletFontIndex(int value)
          Sets the font index of a paragraph's bullet.
 void setBulletHardColor(boolean value)
          Sets whether the bullet uses own color.
 void setBulletHardFont(boolean value)
          Sets whether the bullet uses own font.
 void setBulletHardSize(boolean value)
          Sets whether the bullet has own size.
 void setBulletHeight(short value)
          Sets the bullet size relatively to the size of the first portion in the paragraph.
 void setBulletOffset(short value)
          Sets the offset of the paragraph's bullet.
 void setBulletType(int value)
          Sets the type of a bullet.
 void setDepth(short value)
          Sets the depth of a paragraph.
 void setHasBullet(boolean value)
          Sets whether the paragraph has a bullet.
 void setNumberedBulletStartWith(short value)
           Sets the beginning value of a numbered bullet.
 void setNumberedBulletStyle(int value)
          Sets the style of a numbered bullet.
 void setPictureBulletId(short value)
          Sets the Id of a PictureBullet.
 void setRawAlignment(int value)
          Sets the alignment of a paragraph.
 void setRawBulletCharacter(char value)
          Sets the raw character which is used for bullets in a paragraph.
 void setRawBulletColor(java.awt.Color value)
          Sets the raw color of a bullet.
 void setRawBulletFontIndex(int value)
          Sets the raw font of a bullet.
 void setRawBulletHeight(short value)
           Sets the raw bullet size relative to the size of the first portion of a paragraph.
 void setRawBulletOffset(short value)
          Sets the raw offset of a bullet.
 void setRawNumberedBulletStartWith(short value)
          Sets the raw beginning value of a numbered bullet.
 void setRawNumberedBulletStyle(int value)
          Sets the raw style of a numbered bullet.
 void setRawPictureBulletId(short value)
          Sets the Id of a PictureBullet.
 void setRawSpaceAfter(short value)
          Sets the raw amount of space after the last line of a paragraph.
 void setRawSpaceBefore(short value)
          Sets the raw amount of space before the first line of a paragraphPositive value means space defined in percents of line.
 void setRawSpaceWithin(short value)
          Sets the raw amount of space between base lines of a paragraph.
 void setRawTextOffset(short value)
          Sets the raw offset of a text.
 void setSpaceAfter(short value)
          Sets the amount of space after the last line of a paragraph, in percents of line.
 void setSpaceBefore(short value)
          Sets the amount of space before the first line of a paragraph, in percents of line.
 void setSpaceWithin(short value)
           Sets the amount of space between base lines of a paragraph, in percents of line.
 void setText(java.lang.String value)
          Sets the plain text of a paragraph.
 void setTextOffset(short value)
          Sets the offset of a paragraph's text.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Paragraph

public Paragraph()
Initializes a new instance of the Paragraph class.


Paragraph

public Paragraph(Paragraph para)
Initializes a new instance of the Paragraph class.

Parameters:
para - Paragraph object to clone.
Method Detail

equalFormatting

public boolean equalFormatting(Paragraph para)
Determines whether the paragraphs have the same formatting.

Parameters:
para - another paragraph to compare.
Returns:
true if paragraphs have the same formatting, false otherwise.

getDepth

public short getDepth()
Returns the depth of a paragraph.


setDepth

public void setDepth(short value)
Sets the depth of a paragraph.

Parameters:
value - new depth of a paragraph.

getHasBullet

public boolean getHasBullet()
Determines whether the paragraph has a bullet.

Returns:
true if the paragraph has a bullet.

setHasBullet

public void setHasBullet(boolean value)
Sets whether the paragraph has a bullet.

Parameters:
value - true if paragraph has a bullet.

isBulletHardColor

public boolean isBulletHardColor()
Determines whether the bullet uses own color.

Returns:
(true) if bullet uses own color and (false) if bullet uses color of the first portion in the paragraph.

setBulletHardColor

public void setBulletHardColor(boolean value)
Sets whether the bullet uses own color.

Parameters:
value - (true) if bullet uses own color and (false) if bullet uses color of the first portion in the paragraph.

getBulletColor

public java.awt.Color getBulletColor()
Returns the color of a paragraph's bullet.


setBulletColor

public void setBulletColor(java.awt.Color value)
Sets the color of a paragraph's bullet.

Parameters:
value - new bullet color.

getBulletColorIndex

public short getBulletColorIndex()
Returns the index of a bulet's color in a color scheme or (-1) for scheme-independent color.


setBulletColorIndex

public void setBulletColorIndex(short value)
Sets the index of a bulet's color in a color scheme or (-1) for scheme-independent color.

Parameters:
value - the index of a bulet's color.

isBulletHardFont

public boolean isBulletHardFont()
Determines whether the bullet uses own font.

Returns:
(true) if the bullet has own font and (false) if it uses font of the first portion in a paragraph.

setBulletHardFont

public void setBulletHardFont(boolean value)
Sets whether the bullet uses own font.

Parameters:
value - ( true) if bullet has own font and (false) if bullet uses font of the first portion in the paragraph.

getBulletFontIndex

public int getBulletFontIndex()
Returns the font index of a paragraph's bullet.


setBulletFontIndex

public void setBulletFontIndex(int value)
Sets the font index of a paragraph's bullet.

Parameters:
value - new font index.

isBulletHardSize

public boolean isBulletHardSize()
Determines whether the bullet has own size.

Returns:
true if the bullet has own size and false if bullet uses size of the first portion in a paragraph.

setBulletHardSize

public void setBulletHardSize(boolean value)
Sets whether the bullet has own size.

Parameters:
value - true if bullet has own size and false if bullet uses size of the first portion in a paragraph.

getBulletHeight

public short getBulletHeight()

Returns the bullet size relatively to the size of the first portion in the paragraph.

Can be a short value from 25 through 400, indicating that the bullet size can be from 25 percent through 400 percent of the text-character. Negative value means bullet height is equal to absolute BulletHeight value and does not depend on portion's font height.


setBulletHeight

public void setBulletHeight(short value)

Sets the bullet size relatively to the size of the first portion in the paragraph.

Can be a short value from 25 through 400, indicating that the bullet size can be from 25 percent through 400 percent of the text-character. Negative value means bullet height is equal to absolute BulletHeight value and does not depend on portion's font height.

Parameters:
value - new bullet height.

getBulletCharacter

public char getBulletCharacter()
Returns the character which is used for a paragraph's bullet.


setBulletCharacter

public void setBulletCharacter(char value)

Sets the character which is used for a paragraph's bullet.

Switches bullet type to Symbol on assigning.

Parameters:
value - new bullet character.

getSpaceBefore

public short getSpaceBefore()

Returns the amount of space before the first line of a paragraph, in percents of line.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points.


setSpaceBefore

public void setSpaceBefore(short value)

Sets the amount of space before the first line of a paragraph, in percents of line.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points.

Parameters:
value - new value of the space before a paragraph.

getSpaceAfter

public short getSpaceAfter()

Returns the amount of space after the last line of a paragraph, in percents of line.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points.


setSpaceAfter

public void setSpaceAfter(short value)

Sets the amount of space after the last line of a paragraph, in percents of line.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points.

Parameters:
value - new value of the space after a paragraph.

getSpaceWithin

public short getSpaceWithin()

Returns the amount of space between base lines of a paragraph, in percents of line.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points.


setSpaceWithin

public void setSpaceWithin(short value)

Sets the amount of space between base lines of a paragraph, in percents of line.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points.

Parameters:
value - new value of the space between base lines in a paragraph.

getBulletOffset

public short getBulletOffset()
Returns the offset of a paragraph's bullet.


setBulletOffset

public void setBulletOffset(short value)
Sets the offset of the paragraph's bullet.

Parameters:
value - new bullet offset.

getTextOffset

public short getTextOffset()
Returns the offset of a paragraph's text.


setTextOffset

public void setTextOffset(short value)
Sets the offset of a paragraph's text.

Parameters:
value - new text offset.

getAlignment

public int getAlignment()
Returns the alignment of a paragraph. See TextAlignment.


setAlignment

public void setAlignment(int value)
Sets the alignment of a paragraph.

Parameters:
value - new paragraph alignment. See TextAlignment.

isExtendedBullet

public boolean isExtendedBullet()
Returns (true) if paragraph has extended bullets (image or numbered).


getBulletType

public int getBulletType()
Returns the type of a bullet. See BulletType.


setBulletType

public void setBulletType(int value)
Sets the type of a bullet.

Parameters:
value - new type of a bullet. See BulletType.

getNumberedBulletStyle

public int getNumberedBulletStyle()

Returns the style of a numbered bullet. See NumberedBulletStyle.

Value ignored for other types of bullets.


setNumberedBulletStyle

public void setNumberedBulletStyle(int value)
Sets the style of a numbered bullet.

Parameters:
value - new style of a numbered bullet. See NumberedBulletStyle.

getNumberedBulletStartWith

public short getNumberedBulletStartWith()

Returns the beginning value of a numbered bullet.

On assigning value greater than (0), switches bullet type to numbered.


setNumberedBulletStartWith

public void setNumberedBulletStartWith(short value)

Sets the beginning value of a numbered bullet.

On assigning value greater than (0), switches bullet type to numbered.

Parameters:
value - new beginning value of a numbered bullet.

getPictureBulletId

public short getPictureBulletId()
Returns the Id of a PictureBullet. (-1) for other types of bullets.


setPictureBulletId

public void setPictureBulletId(short value)
Sets the Id of a PictureBullet.

Parameters:
value - new Id of a PictureBullet.

getRawAlignment

public int getRawAlignment()

Returns the alignment of a paragraph. See TextAlignment.

TextAlignment.DEFAULT means value should be inherited from the master.


setRawAlignment

public void setRawAlignment(int value)

Sets the alignment of a paragraph.

TextAlignment.DEFAULT means value should be inherited from the master.

Parameters:
value - new alignment of a paragraph. See TextAlignment.

getRawTextDirection

public int getRawTextDirection()

Returns the raw direction of a text in a paragraph. See TextDirection.

TextDirection.DEFAULT means value should be inherited from the master.


getRawBulletColor

public java.awt.Color getRawBulletColor()

Returns the raw color of a bullet.

Black transparent value means the color should be inherited from the master.


setRawBulletColor

public void setRawBulletColor(java.awt.Color value)

Sets the raw color of a bullet.

Black transparent value means the color should be inherited from the master.

Parameters:
value - new raw color of a bullet.

getRawBulletFontIndex

public int getRawBulletFontIndex()

Returns the raw font of a bullet.


setRawBulletFontIndex

public void setRawBulletFontIndex(int value)

Sets the raw font of a bullet.

Parameters:
value - new raw font of a bullet.

getRawBulletHeight

public short getRawBulletHeight()

Returns the raw bullet size relative to the size of the first portion of a paragraph.

Can be a short value from 25 to 400, indicating that the bullet size can be from 25 percent to 400 percent of the text-character size. Value (-1) means bullet size should be inherited from the master. Another negative value means bullet height is equal to absolute RawBulletHeight value and does not depend on portion's font height.


setRawBulletHeight

public void setRawBulletHeight(short value)

Sets the raw bullet size relative to the size of the first portion of a paragraph.

Can be a short value from 25 to 400, indicating that the bullet size can be from 25 percent to 400 percent of the text-character size. Value (-1) means bullet size should be inherited from the master. Another negative value means bullet height is equal to absolute RawBulletHeight value and does not depend on portion's font height.

Parameters:
value - new raw bullet size relative to the size of the first portion of a paragraph.

getRawBulletCharacter

public char getRawBulletCharacter()

Returns the raw character which is used for bullets in a paragraph.

Switches bullet type to Symbol on assigning. Value (-1) means bullet character should be inherited from the master.


setRawBulletCharacter

public void setRawBulletCharacter(char value)

Sets the raw character which is used for bullets in a paragraph.

Switches bullet type to Symbol on assigning. Value (-1) means bullet character should be inherited from the master.

Parameters:
value - new raw character which is used for bullets in a paragraph.

getRawSpaceBefore

public short getRawSpaceBefore()

Returns the raw amount of space before the first line of a paragraph.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points. Value (-1) means raw space should be inherited from the master.


setRawSpaceBefore

public void setRawSpaceBefore(short value)

Sets the raw amount of space before the first line of a paragraph

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points. Value (-1) means raw space should be inherited from the master.

Parameters:
value - new raw amount of space before the first line of a paragraph.

getRawSpaceAfter

public short getRawSpaceAfter()

Returns the raw amount of space after the last line of a paragraph

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points. Value (-1) means raw space should be inherited from the master.


setRawSpaceAfter

public void setRawSpaceAfter(short value)

Sets the raw amount of space after the last line of a paragraph.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points. Value (-1) means raw space should be inherited from the master.

Parameters:
value - new raw amount of space after the last line in a paragraph.

getRawSpaceWithin

public short getRawSpaceWithin()

Returns the raw amount of space between base lines of a paragraph.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points. Value (-1) means raw space should be inherited from the master.


setRawSpaceWithin

public void setRawSpaceWithin(short value)

Sets the raw amount of space between base lines of a paragraph.

Positive value means space defined in percents of line. Values (-8) and less should be divided by (-8) to obtain space in points. Value (-1) means raw space should be inherited from the master.

Parameters:
value - new raw amount of space between base lines of a paragraph.

getRawBulletOffset

public short getRawBulletOffset()

Returns the raw offset of a bullet.

Value (-1) means raw bullet should be inherited from the ruler or the master.


setRawBulletOffset

public void setRawBulletOffset(short value)

Sets the raw offset of a bullet.

Value (-1) means raw bullet should be inherited from the ruler or the master.

Parameters:
value - new raw offset of a bullet.

getRawTextOffset

public short getRawTextOffset()

Returns the raw offset of a text.

Value (-1) means raw text should be inherited from the ruler or the master.


setRawTextOffset

public void setRawTextOffset(short value)

Sets the raw offset of a text.

Value (-1) means raw text should be inherited from the ruler or the master.

Parameters:
value - new raw offset of a text.

getRawNumberedBulletStyle

public int getRawNumberedBulletStyle()

Returns the raw style of a numbered bullet. See NumberedBulletStyle.

NumberedBulletStyle.BulletDefault means value should be inherited from the master.


setRawNumberedBulletStyle

public void setRawNumberedBulletStyle(int value)

Sets the raw style of a numbered bullet.

NumberedBulletStyle.BulletDefault means value should be inherited from the master.

Parameters:
value - new raw style of a numbered bullet. See NumberedBulletStyle.

getRawNumberedBulletStartWith

public short getRawNumberedBulletStartWith()

Returns the raw beginning value of a numbered bullet.

(-1) means value should be inherited from the master.


setRawNumberedBulletStartWith

public void setRawNumberedBulletStartWith(short value)

Sets the raw beginning value of a numbered bullet.

(-1) means value should be inherited from the master.

Parameters:
value - new raw beginning value of a numbered bullet.

getRawPictureBulletId

public short getRawPictureBulletId()
Returns the Id of a PictureBullet.


setRawPictureBulletId

public void setRawPictureBulletId(short value)

Sets the Id of a PictureBullet.

Parameters:
value - new raw Id of a PictureBullet.

getPortions

public Portions getPortions()
Returns the collection of text portions.


getText

public java.lang.String getText()
Returns the plain text of a paragraph.


setText

public void setText(java.lang.String value)
             throws PptEditException
Sets the plain text of a paragraph.

Parameters:
value - new plain text.
Throws:
PptEditException