[]
Serializable, Comparable<ColorDataIndex>, Constable使用此枚举可应用内置颜色索引含义,而不是基于调色板的数字索引。例如,Automatic 表示自动颜色,None 表示目标颜色未设置或无颜色。
IRange cell = worksheet.getRange("A1");
cell.setValue("ColorDataIndex example");
cell.getInterior().setPattern(Pattern.Solid);
cell.getInterior().setPatternColorIndex(ColorDataIndex.Automatic.getValue());
ColorDataIndex patternColorIndex =
ColorDataIndex.forValue(cell.getInterior().getPatternColorIndex());
Enum.EnumDesc<E extends Enum<E>>static ColorDataIndexforValue(int value) intgetValue()static ColorDataIndexstatic ColorDataIndex[]values()name - the name of the enum constant to be returned.IllegalArgumentException - if this enum class has no constant with the specified nameNullPointerException - if the argument is nullvalue - The integer value of the color data index.ColorDataIndex enum constant associated with the specified value.IllegalArgumentException - if value does not match a defined color data index.