public final class PaletteRecord extends StandardRecord
Modifier and Type | Field and Description |
---|---|
static short |
FIRST_COLOR_INDEX
The byte index of the first color
(第一种颜色的字节索引)
|
static short |
sid |
static byte |
STANDARD_PALETTE_SIZE
The standard size of an XLS palette
(XLS 调色板的标准尺寸)
|
Constructor and Description |
---|
PaletteRecord() |
PaletteRecord(PaletteRecord other) |
PaletteRecord(RecordInputStream in) |
Modifier and Type | Method and Description |
---|---|
PaletteRecord |
copy() |
byte[] |
getColor(int byteIndex)
Returns the color value at a given index
(返回给定索引处的颜色值)
|
protected int |
getDataSize() |
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
HSSFRecordTypes |
getGenericRecordType() |
short |
getSid()
return the non static version of the id for this record.
(返回此记录的 id 的非静态版本。)
|
void |
serialize(LittleEndianOutput out)
Write the data content of this BIFF record.
(写入此 BIFF 记录的数据内容。)
|
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.
(在给定索引处设置颜色值 如果给定索引大于当前最后一个颜色索引,则在使调色板连续所需的每个索引处插入黑色。)
|
getRecordSize, serialize
cloneViaReserialise, serialize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGenericChildren
public static final short sid
public static final byte STANDARD_PALETTE_SIZE
public static final short FIRST_COLOR_INDEX
public PaletteRecord()
public PaletteRecord(PaletteRecord other)
public PaletteRecord(RecordInputStream in)
public void serialize(LittleEndianOutput out)
StandardRecord
The number of bytes written must equal the record size reported by RecordBase.getRecordSize()
} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).
serialize
in class
StandardRecord
(在 StandardRecord 类中序列化)
out
- the output object
(out - 输出对象)
protected int getDataSize()
getDataSize
in class
StandardRecord
(类 StandardRecord 中的 getDataSize)
public short getSid()
Record
public byte[] getColor(int byteIndex)
byteIndex
- palette index, must be >= 0x8
(byteIndex - 调色板索引,必须 >= 0x8)
null
if the specified index does not exist
(颜色的 RGB 三元组,如果指定的索引不存在,则返回 null)
public void setColor(short byteIndex, byte red, byte green, byte blue)
byteIndex
- the index to set; if this index is less than 0x8 or greater than 0x40, then no modification is made
(byteIndex - 要设置的索引;如果此索引小于 0x8 或大于 0x40,则不进行修改)
red
- the red color part
(red - 红色部分)
green
- the green color part
(green - 绿色部分)
blue
- the blue color part
(blue - 蓝色部分)
public PaletteRecord copy()
copy
in interface
Duplicatable
(复制到界面 Duplicatable)
copy
in class
StandardRecord
(在 StandardRecord 类中复制)
public HSSFRecordTypes getGenericRecordType()
getGenericRecordType
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericRecordType)
getGenericRecordType
in class
Record
(类 Record 中的 getGenericRecordType)
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.