Enum IndexedColors

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<IndexedColors>

    public enum IndexedColors
    extends java.lang.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.

    • Field Detail

      • index

        public final short index
    • Method Detail

      • values

        public static IndexedColors[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (IndexedColors c : IndexedColors.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

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

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

        public static IndexedColors fromInt​(int index)
        index - the index of the color
        the corresponding IndexedColors enum
        java.lang.IllegalArgumentException - if index is not a valid IndexedColors