| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private PaletteRecord |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public HSSFColor | Returns: The new custom color.The red component red, byte The green component green, byte The blue component blue)Adds a new color into an empty color slot. |
| public HSSFColor | Returns: the color, or null if the color does not exist in this palettethe RGB red component, between 0 and 255 inclusive red, byte the RGB green component, between 0 and 255 inclusive green, byte the RGB blue component, between 0 and 255 inclusive blue)Finds the first occurrence of a given color |
| public HSSFColor | Returns: The closest color or null if there are no custom colors currently defined.The red component of the color to match. red, byte The green component of the color to match. green, byte The blue component of the color to match. blue)Finds the closest matching color in the custom palette. |
| public HSSFColor | Returns: The closest color or null if there are no custom colors currently defined.The red component of the color to match. red, int The green component of the color to match. green, int The blue component of the color to match. blue)Finds the closest matching color in the custom palette. |
| public HSSFColor | Returns: the color, or null if the index is not populatedthe palette index, between 0x8 to 0x40 inclusive index)Retrieves the color at a given index |
| public HSSFColor | Returns: the color, or null if the index is not populatedthe palette index, between 0x8 to 0x40 inclusive index)Retrieves the color at a given index |
| public void | setColorAtIndex(short
the palette index, between 0x8 to 0x40 inclusive index, byte the RGB red component, between 0 and 255 inclusive red, byte the RGB green component, between 0 and 255 inclusive green, byte the RGB blue component, between 0 and 255 inclusive blue)Sets the color at the given offset |
| private int | unsignedInt(byte b)
Turn a byte of between -127 and 127 into something between 0 and 255, so distance calculations work as expected. |
| _palette | back to summary |
|---|---|
| private PaletteRecord _palette | |
| HSSFPalette | back to summary |
|---|---|
| protected HSSFPalette(PaletteRecord palette) | |
| addColor | back to summary |
|---|---|
| public HSSFColor addColor(byte red, byte green, byte blue) Adds a new color into an empty color slot.
| |
| findColor | back to summary |
|---|---|
| public HSSFColor findColor(byte red, byte green, byte blue) Finds the first occurrence of a given color
| |
| findSimilarColor | back to summary |
|---|---|
| public HSSFColor findSimilarColor(byte red, byte green, byte blue) Finds the closest matching color in the custom palette. The method for finding the distance between the colors is fairly primative.
| |
| findSimilarColor | back to summary |
|---|---|
| public HSSFColor findSimilarColor(int red, int green, int blue) Finds the closest matching color in the custom palette. The method for finding the distance between the colors is fairly primative.
| |
| getColor | back to summary |
|---|---|
| public HSSFColor getColor(short index) Retrieves the color at a given index
| |
| getColor | back to summary |
|---|---|
| public HSSFColor getColor(int index) Retrieves the color at a given index
| |
| setColorAtIndex | back to summary |
|---|---|
| public void setColorAtIndex(short index, byte red, byte green, byte blue) Sets the color at the given offset
| |
| unsignedInt | back to summary |
|---|---|
| private int unsignedInt(byte b) Turn a byte of between -127 and 127 into something between 0 and 255, so distance calculations work as expected. | |
| Modifier and Type | Field and Description |
|---|---|
| private byte | |
| private short | |
| private byte | |
| private byte |
| Access | Constructor and Description |
|---|---|
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| public String | getHexString()
Overrides org. returns colon-delimited hex string "0:0:0" |
| public short | getIndex()
Overrides org. returns color standard palette index |
| public short[] |
| _blue | back to summary |
|---|---|
| private byte _blue | |
| _byteOffset | back to summary |
|---|---|
| private short _byteOffset | |
| _green | back to summary |
|---|---|
| private byte _green | |
| _red | back to summary |
|---|---|
| private byte _red | |
| CustomColor | back to summary |
|---|---|
| public CustomColor(short byteOffset, byte[] colors) | |
| CustomColor | back to summary |
|---|---|
| private CustomColor(short byteOffset, byte red, byte green, byte blue) | |
| getGnumericPart | back to summary |
|---|---|
| private String getGnumericPart(byte color) | |
| getHexString | back to summary |
|---|---|
| public String getHexString() Overrides org. Doc from org. returns colon-delimited hex string "0:0:0" | |
| getIndex | back to summary |
|---|---|
| public short getIndex() Overrides org. Doc from org. returns color standard palette index
| |
| getTriplet | back to summary |
|---|---|
| public short[] getTriplet() Overrides org. Doc from org. returns RGB triplet (0, 0, 0)
| |