Class ExtendedColor
- java.lang.Object
-
- org.apache.poi.hssf.record.common.ExtendedColor
-
- All Implemented Interfaces:
Duplicatable,GenericRecord
public final class ExtendedColor extends Object implements Duplicatable, GenericRecord
Title: CTColor (Extended Color) record partThe HSSF file format normally stores Color information in the Palette (see PaletteRecord), but for a few cases (eg Conditional Formatting, Sheet Extensions), this XSSF-style color record can be used.
-
-
Field Summary
Fields Modifier and Type Field Description static intTHEME_ACCENT_1static intTHEME_ACCENT_2static intTHEME_ACCENT_3static intTHEME_ACCENT_4static intTHEME_ACCENT_5static intTHEME_ACCENT_6static intTHEME_DARK_1static intTHEME_DARK_2static intTHEME_FOLLOWED_HYPERLINKstatic intTHEME_HYPERLINKstatic intTHEME_LIGHT_1static intTHEME_LIGHT_2static intTYPE_AUTOstatic intTYPE_INDEXEDstatic intTYPE_RGBstatic intTYPE_THEMEDstatic intTYPE_UNSET
-
Constructor Summary
Constructors Constructor Description ExtendedColor()ExtendedColor(ExtendedColor other)ExtendedColor(LittleEndianInput in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtendedColorcopy()intgetColorIndex()intgetDataLength()Map<String,Supplier<?>>getGenericProperties()byte[]getRGBA()intgetThemeIndex()doublegetTint()intgetType()voidserialize(LittleEndianOutput out)voidsetColorIndex(int colorIndex)voidsetRGBA(byte[] rgba)voidsetThemeIndex(int themeIndex)voidsetTint(double tint)voidsetType(int type)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
-
-
-
Field Detail
-
TYPE_AUTO
public static final int TYPE_AUTO
- See Also:
- Constant Field Values
-
TYPE_INDEXED
public static final int TYPE_INDEXED
- See Also:
- Constant Field Values
-
TYPE_RGB
public static final int TYPE_RGB
- See Also:
- Constant Field Values
-
TYPE_THEMED
public static final int TYPE_THEMED
- See Also:
- Constant Field Values
-
TYPE_UNSET
public static final int TYPE_UNSET
- See Also:
- Constant Field Values
-
THEME_DARK_1
public static final int THEME_DARK_1
- See Also:
- Constant Field Values
-
THEME_LIGHT_1
public static final int THEME_LIGHT_1
- See Also:
- Constant Field Values
-
THEME_DARK_2
public static final int THEME_DARK_2
- See Also:
- Constant Field Values
-
THEME_LIGHT_2
public static final int THEME_LIGHT_2
- See Also:
- Constant Field Values
-
THEME_ACCENT_1
public static final int THEME_ACCENT_1
- See Also:
- Constant Field Values
-
THEME_ACCENT_2
public static final int THEME_ACCENT_2
- See Also:
- Constant Field Values
-
THEME_ACCENT_3
public static final int THEME_ACCENT_3
- See Also:
- Constant Field Values
-
THEME_ACCENT_4
public static final int THEME_ACCENT_4
- See Also:
- Constant Field Values
-
THEME_ACCENT_5
public static final int THEME_ACCENT_5
- See Also:
- Constant Field Values
-
THEME_ACCENT_6
public static final int THEME_ACCENT_6
- See Also:
- Constant Field Values
-
THEME_HYPERLINK
public static final int THEME_HYPERLINK
- See Also:
- Constant Field Values
-
THEME_FOLLOWED_HYPERLINK
public static final int THEME_FOLLOWED_HYPERLINK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExtendedColor
public ExtendedColor()
-
ExtendedColor
public ExtendedColor(ExtendedColor other)
-
ExtendedColor
public ExtendedColor(LittleEndianInput in)
-
-
Method Detail
-
getType
public int getType()
-
setType
public void setType(int type)
-
getColorIndex
public int getColorIndex()
- Returns:
- Palette color index, if type is
TYPE_INDEXED
-
setColorIndex
public void setColorIndex(int colorIndex)
-
getRGBA
public byte[] getRGBA()
- Returns:
- Red Green Blue Alpha, if type is
TYPE_RGB
-
setRGBA
public void setRGBA(byte[] rgba)
-
getThemeIndex
public int getThemeIndex()
- Returns:
- Theme color type index, eg
THEME_DARK_1, if type isTYPE_THEMED
-
setThemeIndex
public void setThemeIndex(int themeIndex)
-
getTint
public double getTint()
- Returns:
- Tint and Shade value, between -1 and +1
-
setTint
public void setTint(double tint)
- Parameters:
tint- Tint and Shade value, between -1 and +1
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
copy
public ExtendedColor copy()
- Specified by:
copyin interfaceDuplicatable- Returns:
- a deep copy of the implementing class / instance
-
getDataLength
public int getDataLength()
-
serialize
public void serialize(LittleEndianOutput out)
-
-