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 int
THEME_ACCENT_1
static int
THEME_ACCENT_2
static int
THEME_ACCENT_3
static int
THEME_ACCENT_4
static int
THEME_ACCENT_5
static int
THEME_ACCENT_6
static int
THEME_DARK_1
static int
THEME_DARK_2
static int
THEME_FOLLOWED_HYPERLINK
static int
THEME_HYPERLINK
static int
THEME_LIGHT_1
static int
THEME_LIGHT_2
static int
TYPE_AUTO
static int
TYPE_INDEXED
static int
TYPE_RGB
static int
TYPE_THEMED
static int
TYPE_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 ExtendedColor
copy()
int
getColorIndex()
int
getDataLength()
Map<String,Supplier<?>>
getGenericProperties()
byte[]
getRGBA()
int
getThemeIndex()
double
getTint()
int
getType()
void
serialize(LittleEndianOutput out)
void
setColorIndex(int colorIndex)
void
setRGBA(byte[] rgba)
void
setThemeIndex(int themeIndex)
void
setTint(double tint)
void
setType(int type)
String
toString()
-
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:
getGenericProperties
in interfaceGenericRecord
-
copy
public ExtendedColor copy()
- Specified by:
copy
in interfaceDuplicatable
- Returns:
- a deep copy of the implementing class / instance
-
getDataLength
public int getDataLength()
-
serialize
public void serialize(LittleEndianOutput out)
-
-