FontFallBackRulesCollection
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.slides.IFontFallBackRulesCollection
public class FontFallBackRulesCollection implements IFontFallBackRulesCollection
Represents a collection of FontFallBack rules, defined by user
Constructors
| Constructor | Description | 
|---|---|
| FontFallBackRulesCollection() | 
Methods
| Method | Description | 
|---|---|
| size() | Gets the number of rules actually contained in the collection. | 
| add(IFontFallBackRule sourceRule) | Add a specified FallBack rule to the end of the collection. | 
| remove(IFontFallBackRule targetRule) | Removes the first occurrence of a specific FallBack rule from the collection. | 
| get_Item(int index) | Gets the rule at the specified index. | 
| iterator() | Returns an enumerator that iterates through the collection. | 
| iteratorJava() | Returns a java iterator for the entire collection. | 
| copyTo(System.Array array, int index) | Copies all elements from the collection to the specified array. | 
| isSynchronized() | Returns a value indicating whether access to the collection is synchronized (thread-safe). | 
| getSyncRoot() | Returns a synchronization root. | 
FontFallBackRulesCollection()
public FontFallBackRulesCollection()
size()
public final int size()
Gets the number of rules actually contained in the collection. Read-only int.
Returns: int
add(IFontFallBackRule sourceRule)
public final void add(IFontFallBackRule sourceRule)
Add a specified FallBack rule to the end of the collection.
Presentation pres = new Presentation(); try { //Getting of empty or preinitialized rules collection from FontsManager IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection(); //Adding of new rule to collection rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman")); } finally { if (pres != null) pres.dispose(); }
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| sourceRule | IFontFallBackRule | Specified rule for adding | 
remove(IFontFallBackRule targetRule)
public final void remove(IFontFallBackRule targetRule)
Removes the first occurrence of a specific FallBack rule from the collection.
Presentation pres = new Presentation(); try { //Getting of empty or preinitialized rules collection from FontsManager IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection(); //Adding of several rules to collection rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman")); rulesList.add(new FontFallBackRule(0x3040, 0x309F, "MS Mincho")); //Retrieving of object of the first rule in collection IFontFallBackRule firstRule = rulesList.get_Item(0); //Removing rulesList.remove(firstRule); } finally { if (pres != null) pres.dispose(); }
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| targetRule | IFontFallBackRule | The rule to remove from the collection. | 
get_Item(int index)
public final IFontFallBackRule get_Item(int index)
Gets the rule at the specified index. Read-only IFontFallBackRule.
Presentation pres = new Presentation(); try { //Getting of empty or preinitialized rules collection from FontsManager IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection(); //Adding of several rules to collection rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman")); rulesList.add(new FontFallBackRule(0x3040, 0x309F, "MS Mincho")); //Retrieving of object of the first rule in collection IFontFallBackRule firstRule = rulesList.get_Item(0); } finally { if (pres != null) pres.dispose(); }
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| index | int | 
Returns: IFontFallBackRule
iterator()
public final System.Collections.Generic.IGenericEnumerator<IFontFallBackRule> iterator()
Returns an enumerator that iterates through the collection.
Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IFontFallBackRule> - A IGenericEnumerator that can be used to iterate through the collection.
iteratorJava()
public final System.Collections.Generic.IGenericEnumerator<IFontFallBackRule> iteratorJava()
Returns a java iterator for the entire collection.
Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IFontFallBackRule> - An java.util.Iterator for the entire collection.
copyTo(System.Array array, int index)
public final void copyTo(System.Array array, int index)
Copies all elements from the collection to the specified array.
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| array | com.aspose.ms.System.Array | Target array. | 
| index | int | Starting index in the target array. | 
isSynchronized()
public final boolean isSynchronized()
Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only boolean.
Returns: boolean
getSyncRoot()
public final Object getSyncRoot()
Returns a synchronization root. Read-only Object.
Returns: java.lang.Object