public class FontFallBackRulesCollection extends java.lang.Object implements IFontFallBackRulesCollection
Represents a collection of FontFallBack rules, defined by user
Constructor and Description |
---|
FontFallBackRulesCollection() |
Modifier and Type | Method and Description |
---|---|
void |
add(IFontFallBackRule sourceRule)
Add a specified FallBack rule to the end of the collection.
|
void |
copyTo(com.aspose.ms.System.Array array,
int index)
Copies all elements from the collection to the specified array.
|
IFontFallBackRule |
get_Item(int index)
Gets the rule at the specified index.
|
java.lang.Object |
getSyncRoot()
Returns a synchronization root.
|
boolean |
isSynchronized()
Returns a value indicating whether access to the collection is synchronized (thread-safe).
|
com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IFontFallBackRule> |
iterator()
Returns an enumerator that iterates through the collection.
|
void |
remove(IFontFallBackRule targetRule)
Removes the first occurrence of a specific FallBack rule from the collection.
|
int |
size()
Gets the number of rules actually contained in the collection.
|
public final int size()
Gets the number of rules actually contained in the collection.
Read-only int
.
size
in interface com.aspose.ms.System.Collections.ICollection<IFontFallBackRule>
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(); }
add
in interface IFontFallBackRulesCollection
sourceRule
- Specified rule for addingpublic 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(); }
remove
in interface IFontFallBackRulesCollection
targetRule
- The rule to remove from the collection.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(); }
get_Item
in interface IFontFallBackRulesCollection
public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IFontFallBackRule> iterator()
Returns an enumerator that iterates through the collection.
iterator
in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IFontFallBackRule>
iterator
in interface com.aspose.ms.System.Collections.IEnumerable<IFontFallBackRule>
iterator
in interface java.lang.Iterable<IFontFallBackRule>
System.Collections.Generic.IEnumerator`1
that can be used to iterate through the collection.public final void copyTo(com.aspose.ms.System.Array array, int index)
Copies all elements from the collection to the specified array.
copyTo
in interface com.aspose.ms.System.Collections.ICollection<IFontFallBackRule>
array
- Target array.index
- Starting index in the target array.public final boolean isSynchronized()
Returns a value indicating whether access to the collection is synchronized (thread-safe).
Read-only boolean
.
isSynchronized
in interface com.aspose.ms.System.Collections.ICollection<IFontFallBackRule>
public final java.lang.Object getSyncRoot()
Returns a synchronization root.
Read-only Object
.
getSyncRoot
in interface com.aspose.ms.System.Collections.ICollection<IFontFallBackRule>