Package org.apache.poi.hwmf.record
Class HwmfPalette.WmfPaletteParent
- java.lang.Object
-
- org.apache.poi.hwmf.record.HwmfPalette.WmfPaletteParent
-
- All Implemented Interfaces:
GenericRecord,HwmfObjectTableEntry,HwmfRecord
- Direct Known Subclasses:
HwmfPalette.WmfAnimatePalette,HwmfPalette.WmfCreatePalette,HwmfPalette.WmfSetPaletteEntries
- Enclosing class:
- HwmfPalette
public abstract static class HwmfPalette.WmfPaletteParent extends Object implements HwmfRecord, HwmfObjectTableEntry
-
-
Field Summary
Fields Modifier and Type Field Description protected List<HwmfPalette.PaletteEntry>paletteprotected intstartStart (2 bytes): A 16-bit unsigned integer that defines the offset into the Palette Object when used with the META_SETPALENTRIES and META_ANIMATEPALETTE record types.
-
Constructor Summary
Constructors Constructor Description WmfPaletteParent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(HwmfGraphics ctx)Apply the record settings to the graphics contextMap<String,Supplier<?>>getGenericProperties()intinit(LittleEndianInputStream leis, long recordSize, int recordFunction)Init record from streamprotected intreadPaletteEntries(LittleEndianInputStream leis, int nbrOfEntries)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
Methods inherited from interface org.apache.poi.hwmf.record.HwmfObjectTableEntry
applyObject
-
Methods inherited from interface org.apache.poi.hwmf.record.HwmfRecord
getGenericRecordType, getWmfRecordType
-
-
-
-
Field Detail
-
start
protected int start
Start (2 bytes): A 16-bit unsigned integer that defines the offset into the Palette Object when used with the META_SETPALENTRIES and META_ANIMATEPALETTE record types. When used with META_CREATEPALETTE, it MUST be 0x0300
-
palette
protected final List<HwmfPalette.PaletteEntry> palette
-
-
Method Detail
-
init
public int init(LittleEndianInputStream leis, long recordSize, int recordFunction) throws IOException
Description copied from interface:HwmfRecordInit record from stream- Specified by:
initin interfaceHwmfRecord- Parameters:
leis- the little endian input stream- Returns:
- count of processed bytes
- Throws:
IOException
-
readPaletteEntries
protected int readPaletteEntries(LittleEndianInputStream leis, int nbrOfEntries) throws IOException
- Throws:
IOException
-
draw
public final void draw(HwmfGraphics ctx)
Description copied from interface:HwmfRecordApply the record settings to the graphics context- Specified by:
drawin interfaceHwmfRecord- Parameters:
ctx- the graphics context to modify
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
-