com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class FontFallBackRulesCollection

  • java.lang.Object
    • com.aspose.slides.FontFallBackRulesCollection
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • FontFallBackRulesCollection

        public FontFallBackRulesCollection()
    • Method Detail

      • size

        public final int size()

        Gets the number of rules actually contained in the collection. Read-only int.

        Specified by:
        size in interface com.aspose.ms.System.Collections.ICollection<IFontFallBackRule>
      • add

        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();
         }
         
        Specified by:
        add in interface IFontFallBackRulesCollection
        Parameters:
        sourceRule - Specified rule for adding
      • remove

        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();
         }
         
        Specified by:
        remove in interface IFontFallBackRulesCollection
        Parameters:
        targetRule - The rule to remove from the collection.
      • get_Item

        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();
         }
         
        Specified by:
        get_Item in interface IFontFallBackRulesCollection
      • iterator

        public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IFontFallBackRule> iterator()

        Returns an enumerator that iterates through the collection.

        Specified by:
        iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IFontFallBackRule>
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable<IFontFallBackRule>
        Specified by:
        iterator in interface java.lang.Iterable<IFontFallBackRule>
        Returns:
        A System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.
      • copyTo

        public final void copyTo(com.aspose.ms.System.Array array,
                                 int index)

        Copies all elements from the collection to the specified array.

        Specified by:
        copyTo in interface com.aspose.ms.System.Collections.ICollection<IFontFallBackRule>
        Parameters:
        array - Target array.
        index - 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.

        Specified by:
        isSynchronized in interface com.aspose.ms.System.Collections.ICollection<IFontFallBackRule>
      • getSyncRoot

        public final java.lang.Object getSyncRoot()

        Returns a synchronization root. Read-only Object.

        Specified by:
        getSyncRoot in interface com.aspose.ms.System.Collections.ICollection<IFontFallBackRule>