| java.lang.Object org.apache.poi.hssf.record.Record org.apache.poi.hssf.record.PaletteRecord
PaletteRecord | public class PaletteRecord extends Record (Code) | | PaletteRecord - Supports custom palettes.
author: Andrew C. Oliver (acoliver at apache dot org) author: Brian Sanders (bsanders at risklabs dot com) - custom palette editing version: 2.0-pre |
Method Summary | |
protected void | fillFields(RecordInputStream in) | public byte[] | getColor(short byteIndex) | public int | getRecordSize() | public short | getSid() | public int | serialize(int offset, byte[] data) | public void | setColor(short byteIndex, byte red, byte green, byte blue) Sets the color value at a given index
If the given index is greater than the current last color index,
then black is inserted at every index required to make the palette continuous. | public String | toString() | protected void | validateSid(short id) |
FIRST_COLOR_INDEX | final public static short FIRST_COLOR_INDEX(Code) | | The byte index of the first color
|
STANDARD_PALETTE_SIZE | final public static byte STANDARD_PALETTE_SIZE(Code) | | The standard size of an XLS palette
|
sid | final public static short sid(Code) | | |
PaletteRecord | public PaletteRecord()(Code) | | |
PaletteRecord | public PaletteRecord(RecordInputStream in)(Code) | | Constructs a PaletteRecord record and sets its fields appropriately.
Parameters: in - the RecordInputstream to read the record from |
getColor | public byte[] getColor(short byteIndex)(Code) | | Returns the color value at a given index
the RGB triplet for the color, or null if the specified indexdoes not exist |
getRecordSize | public int getRecordSize()(Code) | | |
getSid | public short getSid()(Code) | | |
serialize | public int serialize(int offset, byte[] data)(Code) | | |
setColor | public void setColor(short byteIndex, byte red, byte green, byte blue)(Code) | | Sets the color value at a given index
If the given index is greater than the current last color index,
then black is inserted at every index required to make the palette continuous.
Parameters: byteIndex - the index to set; if this index is less than 0x8 or greater than0x40, then no modification is made |
validateSid | protected void validateSid(short id)(Code) | | |
|
|