Package loci.poi.hssf.util
Class HSSFColor
- java.lang.Object
-
- loci.poi.hssf.util.HSSFColor
-
- Direct Known Subclasses:
HSSFColor.AQUA
,HSSFColor.AUTOMATIC
,HSSFColor.BLACK
,HSSFColor.BLUE
,HSSFColor.BLUE_GREY
,HSSFColor.BRIGHT_GREEN
,HSSFColor.BROWN
,HSSFColor.CORAL
,HSSFColor.CORNFLOWER_BLUE
,HSSFColor.DARK_BLUE
,HSSFColor.DARK_GREEN
,HSSFColor.DARK_RED
,HSSFColor.DARK_TEAL
,HSSFColor.DARK_YELLOW
,HSSFColor.GOLD
,HSSFColor.GREEN
,HSSFColor.GREY_25_PERCENT
,HSSFColor.GREY_40_PERCENT
,HSSFColor.GREY_50_PERCENT
,HSSFColor.GREY_80_PERCENT
,HSSFColor.INDIGO
,HSSFColor.LAVENDER
,HSSFColor.LEMON_CHIFFON
,HSSFColor.LIGHT_BLUE
,HSSFColor.LIGHT_CORNFLOWER_BLUE
,HSSFColor.LIGHT_GREEN
,HSSFColor.LIGHT_ORANGE
,HSSFColor.LIGHT_TURQUOISE
,HSSFColor.LIGHT_YELLOW
,HSSFColor.LIME
,HSSFColor.MAROON
,HSSFColor.OLIVE_GREEN
,HSSFColor.ORANGE
,HSSFColor.ORCHID
,HSSFColor.PALE_BLUE
,HSSFColor.PINK
,HSSFColor.PLUM
,HSSFColor.RED
,HSSFColor.ROSE
,HSSFColor.ROYAL_BLUE
,HSSFColor.SEA_GREEN
,HSSFColor.SKY_BLUE
,HSSFColor.TAN
,HSSFColor.TEAL
,HSSFColor.TURQUOISE
,HSSFColor.VIOLET
,HSSFColor.WHITE
,HSSFColor.YELLOW
public class HSSFColor extends Object
Intends to provide support for the very evil index to triplet issue and will likely replace the color contants 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 collusion of function between HSSF and the HSSFSerializer but I think its a reasonable one in this case.- Author:
- Andrew C. Oliver (acoliver at apache dot org), Brian Sanders (bsanders at risklabs dot com) - full default color palette
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HSSFColor.AQUA
Class AQUAstatic class
HSSFColor.AUTOMATIC
Special Default/Normal/Automatic color.static class
HSSFColor.BLACK
Class BLACKstatic class
HSSFColor.BLUE
Class BLUEstatic class
HSSFColor.BLUE_GREY
Class BLUE_GREYstatic class
HSSFColor.BRIGHT_GREEN
Class BRIGHT_GREENstatic class
HSSFColor.BROWN
Class BROWNstatic class
HSSFColor.CORAL
Class CORALstatic class
HSSFColor.CORNFLOWER_BLUE
Class CORNFLOWER_BLUEstatic class
HSSFColor.DARK_BLUE
Class DARK_BLUEstatic class
HSSFColor.DARK_GREEN
Class DARK_GREENstatic class
HSSFColor.DARK_RED
Class DARK_REDstatic class
HSSFColor.DARK_TEAL
Class DARK_TEALstatic class
HSSFColor.DARK_YELLOW
Class DARK_YELLOWstatic class
HSSFColor.GOLD
Class GOLDstatic class
HSSFColor.GREEN
Class GREENstatic class
HSSFColor.GREY_25_PERCENT
Class GREY_25_PERCENTstatic class
HSSFColor.GREY_40_PERCENT
Class GREY_40_PERCENTstatic class
HSSFColor.GREY_50_PERCENT
Class GREY_50_PERCENTstatic class
HSSFColor.GREY_80_PERCENT
Class GREY_80_PERCENTstatic class
HSSFColor.INDIGO
Class INDIGOstatic class
HSSFColor.LAVENDER
Class LAVENDERstatic class
HSSFColor.LEMON_CHIFFON
Class LEMON_CHIFFONstatic class
HSSFColor.LIGHT_BLUE
Class LIGHT_BLUEstatic class
HSSFColor.LIGHT_CORNFLOWER_BLUE
Class LIGHT_CORNFLOWER_BLUEstatic class
HSSFColor.LIGHT_GREEN
Class LIGHT_GREENstatic class
HSSFColor.LIGHT_ORANGE
Class LIGHT_ORANGEstatic class
HSSFColor.LIGHT_TURQUOISE
Class LIGHT_TURQUOISEstatic class
HSSFColor.LIGHT_YELLOW
Class LIGHT_YELLOWstatic class
HSSFColor.LIME
Class LIMEstatic class
HSSFColor.MAROON
Class MAROONstatic class
HSSFColor.OLIVE_GREEN
Class OLIVE_GREENstatic class
HSSFColor.ORANGE
Class ORANGEstatic class
HSSFColor.ORCHID
Class ORCHIDstatic class
HSSFColor.PALE_BLUE
Class PALE_BLUEstatic class
HSSFColor.PINK
Class PINKstatic class
HSSFColor.PLUM
Class PLUMstatic class
HSSFColor.RED
Class REDstatic class
HSSFColor.ROSE
Class ROSEstatic class
HSSFColor.ROYAL_BLUE
Class ROYAL_BLUEstatic class
HSSFColor.SEA_GREEN
Class SEA_GREENstatic class
HSSFColor.SKY_BLUE
Class SKY_BLUEstatic class
HSSFColor.TAN
Class TANstatic class
HSSFColor.TEAL
Class TEALstatic class
HSSFColor.TURQUOISE
Class TURQUOISEstatic class
HSSFColor.VIOLET
Class VIOLETstatic class
HSSFColor.WHITE
Class WHITEstatic class
HSSFColor.YELLOW
Class YELLOW
-
Constructor Summary
Constructors Constructor Description HSSFColor()
Creates a new instance of HSSFColor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHexString()
short
getIndex()
static Hashtable
getIndexHash()
this function returns all colors in a hastable.short[]
getTriplet()
static Hashtable
getTripletHash()
this function returns all colors in a hastable.
-
-
-
Method Detail
-
getIndexHash
public static final Hashtable getIndexHash()
this function returns all colors in a hastable. Its not implemented as a static member/staticly initialized because that would be dirty in a server environment as it is intended. This means you'll eat the time it takes to create it once per request but you will not hold onto it if you have none of those requests.- Returns:
- a hashtable containing all colors mapped to their excel-style pallette index
-
getTripletHash
public static final Hashtable getTripletHash()
this function returns all colors in a hastable. Its not implemented as a static member/staticly initialized because that would be dirty in a server environment as it is intended. This means you'll eat the time it takes to create it once per request but you will not hold onto it if you have none of those requests.- Returns:
- a hashtable containing all colors mapped to their gnumeric-like triplet string
-
getIndex
public short getIndex()
- Returns:
- index to the standard palette
-
getTriplet
public short[] getTriplet()
- Returns:
- triplet representation like that in Excel
-
getHexString
public String getHexString()
- Returns:
- a hex string exactly like a gnumeric triplet
-
-