PortionFormat

Inheritance: java.lang.Object, com.aspose.slides.PVIObject, com.aspose.slides.BasePortionFormat

All Implemented Interfaces: com.aspose.slides.IPortionFormat

public class PortionFormat extends BasePortionFormat implements IPortionFormat

This class contains the text portion formatting properties. Unlike IPortionFormatEffectiveData, all properties of this class are writeable.


This class is used to return and manipulate text portion formatting properties defined for the particular portion. This means that no inheritance is applied when getting values so for the majority of cases you will get values meaning “undefined”.

In order to get the effective formatting parameter values including inherited you need to use PortionFormat#getEffective method which returns a IPortionFormatEffectiveData instance.

Constructors

Constructor Description
PortionFormat() Initializes a new instance of PortionFormat class.

Methods

Method Description
getBookmarkId() Returns or sets bookmark identifier.
setBookmarkId(String value) Returns or sets bookmark identifier.
getSmartTagClean() Determines whether the smart tag should be cleaned.
setSmartTagClean(boolean value) Determines whether the smart tag should be cleaned.
getHyperlinkClick() Returns or sets the hyperlink defined for mouse click.
setHyperlinkClick(IHyperlink value) Returns or sets the hyperlink defined for mouse click.
getHyperlinkMouseOver() Returns or sets the hyperlink defined for mouse over.
setHyperlinkMouseOver(IHyperlink value) Returns or sets the hyperlink defined for mouse over.
getHyperlinkManager() Hyperlinks manager.
getEffective() Gets effective portion formatting data with the inheritance applied.

PortionFormat()

public PortionFormat()

Initializes a new instance of PortionFormat class.

getBookmarkId()

public final String getBookmarkId()

Returns or sets bookmark identifier. Read/write String.

Returns: java.lang.String

setBookmarkId(String value)

public final void setBookmarkId(String value)

Returns or sets bookmark identifier. Read/write String.

Parameters:

Parameter Type Description
value java.lang.String

getSmartTagClean()

public final boolean getSmartTagClean()

Determines whether the smart tag should be cleaned. No inheritance applied. Read/write ``` boolean ```.

Returns: boolean

setSmartTagClean(boolean value)

public final void setSmartTagClean(boolean value)

Determines whether the smart tag should be cleaned. No inheritance applied. Read/write ``` boolean ```.

Parameters:

Parameter Type Description
value boolean

getHyperlinkClick()

public final IHyperlink getHyperlinkClick()

Returns or sets the hyperlink defined for mouse click. Read/write IHyperlink.

Returns: IHyperlink

public final void setHyperlinkClick(IHyperlink value)

Returns or sets the hyperlink defined for mouse click. Read/write IHyperlink.

Parameters:

Parameter Type Description
value IHyperlink

getHyperlinkMouseOver()

public final IHyperlink getHyperlinkMouseOver()

Returns or sets the hyperlink defined for mouse over. Read/write IHyperlink.

Returns: IHyperlink

public final void setHyperlinkMouseOver(IHyperlink value)

Returns or sets the hyperlink defined for mouse over. Read/write IHyperlink.

Parameters:

Parameter Type Description
value IHyperlink

getHyperlinkManager()

public final IHyperlinkManager getHyperlinkManager()

Hyperlinks manager. Read-only IHyperlinkManager.

Returns: IHyperlinkManager

getEffective()

public final IPortionFormatEffectiveData getEffective()

Gets effective portion formatting data with the inheritance applied.


This example demonstrates getting some effective portion format properties.
 
 Presentation pres = new Presentation("MyPresentation.pptx");
 try
 {
 	IAutoShape shape = (IAutoShape)pres.getSlides().get_Item(0).getShapes().get_Item(0);
 	IPortionFormatEffectiveData effectivePortionFormat = shape.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().getEffective();
 	System.out.println("Latin font: " + effectivePortionFormat.getLatinFont().getFontName());
 	System.out.println("Font height: " + effectivePortionFormat.getFontHeight());
 	System.out.println("Fill type: " + effectivePortionFormat.getFillFormat().getFillType());
 } finally {
  if (pres != null) pres.dispose();
 }

Returns: IPortionFormatEffectiveData - A IPortionFormatEffectiveData.