Class ColorRing

  • All Implemented Interfaces:
    java.util.Iterator<com.aspose.cells.Color>

    public class ColorRing
    extends java.lang.Object
    implements java.util.Iterator<com.aspose.cells.Color>
    Iterator over a collection of Aspose Cells Color objects. When the end of the collection is hit it automatically starts at the beginning again, effectively creating an infinite circular collection.
    • Constructor Summary

      Constructors 
      Constructor Description
      ColorRing()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addColor​(int red, int green, int blue)  
      void addTintSeries​(com.aspose.cells.Color baseColor, int tintSteps)
      Adds the provided base color and series of tinted variations to this instance.
      void clearColors()
      Clears all colors currently assigned to this instance.
      boolean hasNext()  
      com.aspose.cells.Color next()  
      void restart()
      Moves position of this collection back to the start so that next call to next() will return the first color in the sequence.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Constructor Detail

      • ColorRing

        public ColorRing()
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<com.aspose.cells.Color>
      • next

        public com.aspose.cells.Color next()
        Specified by:
        next in interface java.util.Iterator<com.aspose.cells.Color>
      • addTintSeries

        public void addTintSeries​(com.aspose.cells.Color baseColor,
                                  int tintSteps)
        Adds the provided base color and series of tinted variations to this instance.
        Parameters:
        baseColor - The based color to start with
        tintSteps - The number of additional tinted versions of the base color to add
      • clearColors

        public void clearColors()
        Clears all colors currently assigned to this instance.
      • restart

        public void restart()
        Moves position of this collection back to the start so that next call to next() will return the first color in the sequence.
      • addColor

        public void addColor​(int red,
                             int green,
                             int blue)