Enum Class IndexedColors

java.lang.Object
java.lang.Enum<IndexedColors>
org.apache.poi.ss.usermodel.IndexedColors
All Implemented Interfaces:
Serializable, Comparable<IndexedColors>, Constable

public enum IndexedColors extends Enum<IndexedColors>
A deprecated indexing scheme for colours that is still required for some records, and for backwards compatibility with OLE2 formats.

Each element corresponds to a color index (zero-based). When using the default indexed color palette, the values are not written out, but instead are implied. When the color palette has been modified from default, then the entire color palette is used.

Author:
Yegor Kozlov
  • Enum Constant Details

  • Field Details

    • index

      public final short index
  • Method Details

    • values

      public static IndexedColors[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IndexedColors valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getIndex

      public short getIndex()
      Returns index of this color
      Returns:
      index of this color
    • fromInt

      public static IndexedColors fromInt(int index)
      Parameters:
      index - the index of the color
      Returns:
      the corresponding IndexedColors enum
      Throws:
      IllegalArgumentException - if index is not a valid IndexedColors
      Since:
      3.15-beta2