|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.util.HSSFColor
public class HSSFColor
Intends to provide support for the very evil index to triplet issue and will likely replace the color constants interface for HSSF 2.0. This class contains static inner class members for representing colors. Each color has an index (for the standard palette in Excel (tm) ), native (RGB) triplet and string triplet. The string triplet is as the color would be represented by Gnumeric. Having (string) this here is a bit of a collision of function between HSSF and the HSSFSerializer but I think its a reasonable one in this case.
Constructor Summary | |
---|---|
HSSFColor()
Creates a new instance of HSSFColor |
|
HSSFColor(int index,
int index2,
java.awt.Color color)
|
Method Summary | |
---|---|
java.lang.String |
getHexString()
returns colon-delimited hex string "0:0:0" |
short |
getIndex()
returns color standard palette index |
short |
getIndex2()
returns alternative color standard palette index |
static java.util.Map<java.lang.Integer,HSSFColor> |
getIndexHash()
This function returns all the colours in an unmodifiable Map. |
static java.util.Map<java.lang.Integer,HSSFColor> |
getMutableIndexHash()
This function returns all the Colours, stored in a Map that can be edited. |
short[] |
getTriplet()
returns RGB triplet (0, 0, 0) |
static java.util.Map<java.lang.String,HSSFColor> |
getTripletHash()
this function returns all colors in a hastable. |
static HSSFColor |
toHSSFColor(Color color)
Checked type cast color to an HSSFColor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HSSFColor()
public HSSFColor(int index, int index2, java.awt.Color color)
Method Detail |
---|
public static final java.util.Map<java.lang.Integer,HSSFColor> getIndexHash()
public static final java.util.Map<java.lang.Integer,HSSFColor> getMutableIndexHash()
getIndexHash()
which returns a
statically cached imuatable map of colours.
public static java.util.Map<java.lang.String,HSSFColor> getTripletHash()
public short getIndex()
public short getIndex2()
public short[] getTriplet()
public java.lang.String getHexString()
public static HSSFColor toHSSFColor(Color color)
color
- the color to type cast
java.lang.IllegalArgumentException
- if color is null or is not an instance of HSSFColor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |