|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jxl.biff.RecordData | +--jxl.biff.WritableRecordData | +--jxl.biff.PaletteRecord
A record representing the RGB colour palette
Inner Class Summary | |
private static class |
PaletteRecord.RGB
The internal RGB structure |
Field Summary | |
private boolean |
dirty
A dirty flag indicating that this palette has been tampered with in some way |
private boolean |
initialized
Initialized flag |
private static int |
numColours
The number of colours in the palette |
private boolean |
read
Flag indicating that the palette was read in |
private PaletteRecord.RGB[] |
rgbColours
The list of bespoke rgb colours used by this sheet |
Fields inherited from class jxl.biff.RecordData |
code, record |
Constructor Summary | |
PaletteRecord()
Default constructor - used when there is no palette specified |
|
PaletteRecord(Record t)
Constructor |
Method Summary | |
byte[] |
getData()
Accessor for the binary data - used when copying |
private void |
initialize()
Initialize the record data |
boolean |
isDirty()
Accessor for the dirty flag, which indicates if this palette has been modified |
void |
setColourRGB(Colour c,
int r,
int g,
int b)
Sets the RGB value for the specified colour for this workbook |
private int |
setValueRange(int val,
int min,
int max)
Forces the value passed in to be between the range passed in |
Methods inherited from class jxl.biff.WritableRecordData |
getBytes |
Methods inherited from class jxl.biff.RecordData |
getCode, getRecord |
Methods inherited from class java.lang.Object |
|
Field Detail |
private PaletteRecord.RGB[] rgbColours
private boolean dirty
private boolean read
private boolean initialized
private static final int numColours
Constructor Detail |
public PaletteRecord(Record t)
t
- the raw bytespublic PaletteRecord()
Method Detail |
public byte[] getData()
getData
in class WritableRecordData
private void initialize()
public boolean isDirty()
public void setColourRGB(Colour c, int r, int g, int b)
c
- the colour whose RGB value is to be overwrittenr
- the red portion to set (0-255)g
- the green portion to set (0-255)b
- the blue portion to set (0-255)private int setValueRange(int val, int min, int max)
val
- the value to constrainmin
- the minimum acceptable valuemax
- the maximum acceptable value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |