Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hssf.util
Class HSSFColor

    java.lang.Object
      org.apache.poi.hssf.util.HSSFColor

All Implemented Interfaces:
  Color

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 java.lang.Object
implements Color

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 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
`static class` | `HSSFColor.AQUA` Class AQUA
`static class` | `HSSFColor.AUTOMATIC` Special Default/Normal/Automatic color.
`static class` | `HSSFColor.BLACK` Class BLACK
`static class` | `HSSFColor.BLUE` Class BLUE
`static class` | `HSSFColor.BLUE_GREY` Class BLUE_GREY
`static class` | `HSSFColor.BRIGHT_GREEN` Class BRIGHT_GREEN
`static class` | `HSSFColor.BROWN` Class BROWN
`static class` | `HSSFColor.CORAL` Class CORAL
`static class` | `HSSFColor.CORNFLOWER_BLUE` Class CORNFLOWER_BLUE
`static class` | `HSSFColor.DARK_BLUE` Class DARK_BLUE
`static class` | `HSSFColor.DARK_GREEN` Class DARK_GREEN
`static class` | `HSSFColor.DARK_RED` Class DARK_RED
`static class` | `HSSFColor.DARK_TEAL` Class DARK_TEAL
`static class` | `HSSFColor.DARK_YELLOW` Class DARK_YELLOW
`static class` | `HSSFColor.GOLD` Class GOLD
`static class` | `HSSFColor.GREEN` Class GREEN
`static class` | `HSSFColor.GREY_25_PERCENT` Class GREY_25_PERCENT
`static class` | `HSSFColor.GREY_40_PERCENT` Class GREY_40_PERCENT
`static class` | `HSSFColor.GREY_50_PERCENT` Class GREY_50_PERCENT
`static class` | `HSSFColor.GREY_80_PERCENT` Class GREY_80_PERCENT
`static class` | `HSSFColor.INDIGO` Class INDIGO
`static class` | `HSSFColor.LAVENDER` Class LAVENDER
`static class` | `HSSFColor.LEMON_CHIFFON` Class LEMON_CHIFFON
`static class` | `HSSFColor.LIGHT_BLUE` Class LIGHT_BLUE
`static class` | `HSSFColor.LIGHT_CORNFLOWER_BLUE` Class LIGHT_CORNFLOWER_BLUE
`static class` | `HSSFColor.LIGHT_GREEN` Class LIGHT_GREEN
`static class` | `HSSFColor.LIGHT_ORANGE` Class LIGHT_ORANGE
`static class` | `HSSFColor.LIGHT_TURQUOISE` Class LIGHT_TURQUOISE
`static class` | `HSSFColor.LIGHT_YELLOW` Class LIGHT_YELLOW
`static class` | `HSSFColor.LIME` Class LIME
`static class` | `HSSFColor.MAROON` Class MAROON
`static class` | `HSSFColor.OLIVE_GREEN` Class OLIVE_GREEN
`static class` | `HSSFColor.ORANGE` Class ORANGE
`static class` | `HSSFColor.ORCHID` Class ORCHID
`static class` | `HSSFColor.PALE_BLUE` Class PALE_BLUE
`static class` | `HSSFColor.PINK` Class PINK
`static class` | `HSSFColor.PLUM` Class PLUM
`static class` | `HSSFColor.RED` Class RED
`static class` | `HSSFColor.ROSE` Class ROSE
`static class` | `HSSFColor.ROYAL_BLUE` Class ROYAL_BLUE
`static class` | `HSSFColor.SEA_GREEN` Class SEA_GREEN
`static class` | `HSSFColor.SKY_BLUE` Class SKY_BLUE
`static class` | `HSSFColor.TAN` Class TAN
`static class` | `HSSFColor.TEAL` Class TEAL
`static class` | `HSSFColor.TURQUOISE` Class TURQUOISE
`static class` | `HSSFColor.VIOLET` Class VIOLET
`static class` | `HSSFColor.WHITE` Class WHITE
`static class` | `HSSFColor.YELLOW` Class YELLOW

Constructor Summary
`HSSFColor()` Creates a new instance of HSSFColor

Method Summary
`java.lang.String` | `getHexString()`
`short` | `getIndex()`
`static java.util.Hashtable` | `getIndexHash()` this function returns all colors in a hastable.
`short[]` | `getTriplet()`
`static java.util.Hashtable` | `getTripletHash()` this function returns all colors in a hastable.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HSSFColor

    public HSSFColor()

  Creates a new instance of HSSFColor

Method Detail

### getIndexHash

    public static final java.util.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 keyed by `Integer` excel-style palette indexes

### getTripletHash

    public static final java.util.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 keyed by String gnumeric-like triplets

### getIndex

    public short getIndex()

  Returns:
    index to the standard palette

### getTriplet

    public short[] getTriplet()

  Returns:
    triplet representation like that in Excel

### getHexString

    public java.lang.String getHexString()

  Returns:
    a hex string exactly like a gnumeric triplet

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD