com.aspose.slides
Class Portion

java.lang.Object
  extended by com.aspose.slides.Portion
All Implemented Interfaces:
IFontStyle, IFontStyleRaw

public final class Portion
extends java.lang.Object
implements IFontStyle, IFontStyleRaw

Represents the portion of a text paragraph.


Constructor Summary
Portion()
          Initializes a new instance of the Portion class.
Portion(Portion portion)
          Initializes a new instance of the Portion class.
Portion(java.lang.String str)
          Initializes a new instance of the Portion class.
 
Method Summary
 int getAsianOrComplexFontIndex()
          Returns the index of the font used for east asian and complex text in a Fonts collection.
 short getEscapement()
          Returns superscript or subscript text.
 java.awt.Color getFontColor()
          Returns the color of a portion.
 short getFontColorIndex()
          Returns index of color in color scheme or (-1) for scheme-independed color.
 short getFontHeight()
          Returns the font height of a portion.
 int getFontIndex()
          Returns the index of the used font in a Fonts collection.
 int getRawAsianOrComplexFontIndex()
          Returns the index of a font in Fonts collection for east asian and complex text layout writings.
 short getRawEscapement()
          Returns superscript or subscript text.
 java.awt.Color getRawFontColor()
          Returns a color of a portion.
 short getRawFontEmbossed()
          Returns: -1 if a value should be inherited from the Master.
 short getRawFontHeight()
          Returns font height of a portion.
 int getRawFontIndex()
          Returns the index of a font in Fonts collection.
 short getRawFontShadow()
          Returns: -1 if a value should be inhedited from the Master.
 short getRawFontUnderline()
          Returns: -1 if a value should be inherited from the Master.
 int getRawSymbolFontIndex()
          Returns the index of a font in Fonts collection for special symbols.
 int getSymbolFontIndex()
          Returns the index of the font used for special symbols in a Fonts collection.
 java.lang.String getText()
          Returns the plain text of a portion.
 boolean isFontBold()
          Determines whether the font is bold.
 boolean isFontEmbossed()
          Determines whether the font is embossed.
 boolean isFontItalic()
          Determines whether the font is italic
 boolean isFontShadow()
          Determines whether the font has shadow.
 boolean isFontUnderline()
          Determines whether the font is underlined.
 boolean isRawFontBold()
          Determines whether the master's font Bold property should be inverted.
 boolean isRawFontItalic()
          Determines whether the master's font Itallic property should be inverted.
 void setAsianOrComplexFontIndex(int value)
          Sets the index of the font used for east asian and complex text in a Fonts collection.
 void setEscapement(short value)
          Sets superscript or subscript text.
 void setFontBold(boolean value)
          Sets whether the font is bold.
 void setFontColor(java.awt.Color value)
          Sets the color of a portion.
protected  void setFontColor(java.awt.Color value, int instance)
           
 void setFontColorIndex(short value)
          Sets index of color in color scheme or (-1) for scheme-independed color.
 void setFontEmbossed(boolean value)
          Sets whether the font is embossed.
 void setFontHeight(short value)
          Sets the font height of a portion.
 void setFontIndex(int value)
          Sets the index of the used font in a Fonts collection.
 void setFontItalic(boolean value)
          Sets whether the font is italic.
 void setFontShadow(boolean value)
          Sets whether the font has shadow.
 void setFontUnderline(boolean value)
          Sets whether the font is underlined.
 void setRawAsianOrComplexFontIndex(int value)
          Sets the index of a font in Fonts collection for east asian and complex text layout writings.
 void setRawEscapement(short value)
          Sets superscript or subscript text.
 void setRawFontBold(boolean value)
          Sets whether the master's font Bold property should be inverted.
 void setRawFontColor(java.awt.Color value)
          Sets a color of a portion.
 void setRawFontEmbossed(short value)
          Sets: -1 if a value should be inherited from the Master.
 void setRawFontHeight(short value)
          Sets font height of a portion.
 void setRawFontIndex(int value)
          Sets the index of a font in Fonts collection.
 void setRawFontItalic(boolean value)
          Sets whether the master's font Itallic property should be inverted.
 void setRawFontShadow(short value)
          Sets: -1 if a value should be inhedited from the Master.
 void setRawFontUnderline(short value)
          Sets: -1 if a value should be inherited from the Master.
 void setRawSymbolFontIndex(int value)
          Sets the index of a font in Fonts collection for special symbols.
 void setSymbolFontIndex(int value)
          Sets the index of the font used for special symbols in a Fonts collection.
 void setText(java.lang.String value)
          Sets the plain text of a portion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Portion

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


Portion

public Portion(java.lang.String str)
Initializes a new instance of the Portion class.

Parameters:
str - text string to initialize new Portion class.

Portion

public Portion(Portion portion)
Initializes a new instance of the Portion class.

Parameters:
portion - Portion object to clone.
Method Detail

isFontBold

public boolean isFontBold()
Determines whether the font is bold.

Specified by:
isFontBold in interface IFontStyle
Returns:
true if the font is bold.

setFontBold

public void setFontBold(boolean value)
Sets whether the font is bold.

Specified by:
setFontBold in interface IFontStyle
Parameters:
value - true to make bold font.

isFontItalic

public boolean isFontItalic()
Determines whether the font is italic

Specified by:
isFontItalic in interface IFontStyle
Returns:
true if the font is italic.

setFontItalic

public void setFontItalic(boolean value)
Sets whether the font is italic.

Specified by:
setFontItalic in interface IFontStyle
Parameters:
value - true to make italic font.

isFontUnderline

public boolean isFontUnderline()
Determines whether the font is underlined.

Specified by:
isFontUnderline in interface IFontStyle
Returns:
true if the font is underlined.

setFontUnderline

public void setFontUnderline(boolean value)
Sets whether the font is underlined.

Specified by:
setFontUnderline in interface IFontStyle
Parameters:
value - true to make underlined font.

isFontShadow

public boolean isFontShadow()
Determines whether the font has shadow.

Specified by:
isFontShadow in interface IFontStyle
Returns:
true if the font has shadow.

setFontShadow

public void setFontShadow(boolean value)
Sets whether the font has shadow.

Specified by:
setFontShadow in interface IFontStyle
Parameters:
value - true to make font with shadow.

isFontEmbossed

public boolean isFontEmbossed()
Determines whether the font is embossed.

Specified by:
isFontEmbossed in interface IFontStyle
Returns:
true if the font is embossed.

setFontEmbossed

public void setFontEmbossed(boolean value)
Sets whether the font is embossed.

Specified by:
setFontEmbossed in interface IFontStyle
Parameters:
value - true to make embossed font.

getFontHeight

public short getFontHeight()
Returns the font height of a portion.

Specified by:
getFontHeight in interface IFontStyle
Returns:
The font height.

setFontHeight

public void setFontHeight(short value)
Sets the font height of a portion.

Specified by:
setFontHeight in interface IFontStyle
Parameters:
value - new font height.

getFontColor

public java.awt.Color getFontColor()
Returns the color of a portion.

Specified by:
getFontColor in interface IFontStyle
Returns:
The color of a portion.

setFontColor

public void setFontColor(java.awt.Color value)
Sets the color of a portion.

Specified by:
setFontColor in interface IFontStyle
Parameters:
value - new color for a portion.

setFontColor

protected void setFontColor(java.awt.Color value,
                            int instance)

getFontColorIndex

public short getFontColorIndex()
Returns index of color in color scheme or (-1) for scheme-independed color.

Specified by:
getFontColorIndex in interface IFontStyle
Returns:
index of color in color scheme.

setFontColorIndex

public void setFontColorIndex(short value)
Sets index of color in color scheme or (-1) for scheme-independed color.

Specified by:
setFontColorIndex in interface IFontStyle
Parameters:
value - Sets index of color in color scheme.

getFontIndex

public int getFontIndex()
Returns the index of the used font in a Fonts collection.

Specified by:
getFontIndex in interface IFontStyle
Returns:
The font index.

setFontIndex

public void setFontIndex(int value)
Sets the index of the used font in a Fonts collection.

Specified by:
setFontIndex in interface IFontStyle
Parameters:
value - index of the new font.

getSymbolFontIndex

public int getSymbolFontIndex()
Returns the index of the font used for special symbols in a Fonts collection.

Specified by:
getSymbolFontIndex in interface IFontStyle
Returns:
The font index.

setSymbolFontIndex

public void setSymbolFontIndex(int value)
Sets the index of the font used for special symbols in a Fonts collection.

Specified by:
setSymbolFontIndex in interface IFontStyle
Parameters:
value - index of the new font.

getAsianOrComplexFontIndex

public int getAsianOrComplexFontIndex()
Returns the index of the font used for east asian and complex text in a Fonts collection.

Specified by:
getAsianOrComplexFontIndex in interface IFontStyle
Returns:
The font index.

setAsianOrComplexFontIndex

public void setAsianOrComplexFontIndex(int value)
Sets the index of the font used for east asian and complex text in a Fonts collection.

Specified by:
setAsianOrComplexFontIndex in interface IFontStyle
Parameters:
value - index of the new font.

getText

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

Returns:
The plain text string.

setText

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

Parameters:
value - the plain text string.
Throws:
PptEditException

getEscapement

public short getEscapement()
Returns superscript or subscript text.

Specified by:
getEscapement in interface IFontStyle
Returns:
value from (-100%) - subscript to (100%) - superscript.

setEscapement

public void setEscapement(short value)
Sets superscript or subscript text.

Specified by:
setEscapement in interface IFontStyle
Parameters:
value - from (-100%) - subscript to (100%) - superscript.

isRawFontBold

public boolean isRawFontBold()
Determines whether the master's font Bold property should be inverted.

Specified by:
isRawFontBold in interface IFontStyleRaw
Returns:
true if the master's font Bold property should be inverted.

setRawFontBold

public void setRawFontBold(boolean value)
Sets whether the master's font Bold property should be inverted.

Specified by:
setRawFontBold in interface IFontStyleRaw
Parameters:
value - true if the master's font Bold property should be inverted.

isRawFontItalic

public boolean isRawFontItalic()
Determines whether the master's font Itallic property should be inverted.

Specified by:
isRawFontItalic in interface IFontStyleRaw
Returns:
true if the master's font Itallic property should be inverted.

setRawFontItalic

public void setRawFontItalic(boolean value)
Sets whether the master's font Itallic property should be inverted.

Specified by:
setRawFontItalic in interface IFontStyleRaw
Parameters:
value - true if the master's font Itallic property should be inverted.

getRawFontUnderline

public short getRawFontUnderline()
Returns: Note: 0 and 1 values will be lost in save/load process if they equal to master value.

Specified by:
getRawFontUnderline in interface IFontStyleRaw
Returns:
raw value.

setRawFontUnderline

public void setRawFontUnderline(short value)
Sets: Note: 0 and 1 values will be lost in save/load process if they equal to master value.

Specified by:
setRawFontUnderline in interface IFontStyleRaw
Parameters:
value - raw value.

getRawFontShadow

public short getRawFontShadow()
Returns: Note: 0 and 1 values will be lost in save/load process if they equal to master value.

Specified by:
getRawFontShadow in interface IFontStyleRaw
Returns:
raw value.

setRawFontShadow

public void setRawFontShadow(short value)
Sets: Note: 0 and 1 values will be lost in save/load process if they equal to master value.

Specified by:
setRawFontShadow in interface IFontStyleRaw
Parameters:
value - raw value.

getRawFontEmbossed

public short getRawFontEmbossed()
Returns: Note: 0 and 1 values will be lost in save/load process if they equal to master value.

Specified by:
getRawFontEmbossed in interface IFontStyleRaw
Returns:
raw value.

setRawFontEmbossed

public void setRawFontEmbossed(short value)
Sets: Note: 0 and 1 values will be lost in save/load process if they equal to master value.

Specified by:
setRawFontEmbossed in interface IFontStyleRaw
Parameters:
value - raw value.

getRawFontHeight

public short getRawFontHeight()
Returns font height of a portion. Value (-1) means height isn't defined and should be inherited from the Master.

Specified by:
getRawFontHeight in interface IFontStyleRaw
Returns:
font height of a portion.

setRawFontHeight

public void setRawFontHeight(short value)
Sets font height of a portion. Value (-1) means height isn't defined and should be inherited from the Master.

Specified by:
setRawFontHeight in interface IFontStyleRaw
Parameters:
value - Sets font height of a portion.

getRawFontColor

public java.awt.Color getRawFontColor()
Returns a color of a portion. Black transparent value means color should be inherited from the color scheme or Master.

Specified by:
getRawFontColor in interface IFontStyleRaw
Returns:
a color of a portion.

setRawFontColor

public void setRawFontColor(java.awt.Color value)
Sets a color of a portion. Black transparent value means color should be inherited from the color scheme or Master.

Specified by:
setRawFontColor in interface IFontStyleRaw
Parameters:
value -

getRawFontIndex

public int getRawFontIndex()
Returns the index of a font in Fonts collection. Value (-1) means font isn't defined and should be inherited from the Master.

Specified by:
getRawFontIndex in interface IFontStyleRaw
Returns:
the index of a font in Fonts collection.

setRawFontIndex

public void setRawFontIndex(int value)
Sets the index of a font in Fonts collection. Value (-1) means font isn't defined and should be inherited from the Master.

Specified by:
setRawFontIndex in interface IFontStyleRaw
Parameters:
value - the index of a font in Fonts collection.

getRawSymbolFontIndex

public int getRawSymbolFontIndex()
Returns the index of a font in Fonts collection for special symbols. Value (-1) means font isn't defined and should be inherited from the Master.

Specified by:
getRawSymbolFontIndex in interface IFontStyleRaw
Returns:
the index of a font in Fonts collection for special symbols.

setRawSymbolFontIndex

public void setRawSymbolFontIndex(int value)
Sets the index of a font in Fonts collection for special symbols. Value (-1) means font isn't defined and should be inherited from the Master.

Specified by:
setRawSymbolFontIndex in interface IFontStyleRaw
Parameters:
value - the index of a font in Fonts collection for special symbols.

getRawAsianOrComplexFontIndex

public int getRawAsianOrComplexFontIndex()
Returns the index of a font in Fonts collection for east asian and complex text layout writings. Value (-1) means font isn't defined and should be inherited from the Master.

Specified by:
getRawAsianOrComplexFontIndex in interface IFontStyleRaw
Returns:
the index of a font in Fonts collection.

setRawAsianOrComplexFontIndex

public void setRawAsianOrComplexFontIndex(int value)
Sets the index of a font in Fonts collection for east asian and complex text layout writings. Value (-1) means font isn't defined and should be inherited from the Master.

Specified by:
setRawAsianOrComplexFontIndex in interface IFontStyleRaw
Parameters:
value - the index of a font in Fonts collection.

getRawEscapement

public short getRawEscapement()
Returns superscript or subscript text. Value from -100% (subscript) to 100% (superscript). (-101) means value isn't defined and should be inherited from the Master.

Specified by:
getRawEscapement in interface IFontStyleRaw
Returns:
superscript or subscript text.

setRawEscapement

public void setRawEscapement(short value)
Sets superscript or subscript text. Value from -100% (subscript) to 100% (superscript). (-101) means value isn't defined and should be inherited from the Master.

Specified by:
setRawEscapement in interface IFontStyleRaw
Parameters:
value - superscript or subscript text.