Top Description Fields Constructors Methods
org.apache.poi.hssf.record

public final Class StyleRecord

extends StandardRecord
Class Inheritance
Imports
java.util.Map, java.util.function.Supplier, org.apache.poi.util.BitField, .BitFieldFactory, .GenericRecordUtil, .LittleEndianOutput, .RecordFormatException, .StringUtil

Describes a builtin to the gui or user defined style

Field Summary

Modifier and TypeField and Description
private int
field_1_xf_index

shared by both user defined and built-in styles

private int
private int
private boolean
private String
private static final BitField
public static final short
private static final BitField

Constructor Summary

AccessConstructor and Description
public
StyleRecord()

creates a new style record, initially set to 'built-in'

public
public

Method Summary

Modifier and TypeMethod and Description
public StyleRecord
protected int
public Map<String, Supplier<?>>
public HSSFRecordTypes
public String

Returns:

name of the style
getName
()

get the style's name

public short
getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

public int

Returns:

index of the xf record
getXFIndex
()

get the actual index of the style extended format record

public boolean
public void
serialize(LittleEndianOutput
the output object
out
)

Implements abstract org.apache.poi.hssf.record.StandardRecord.serialize.

Write the data content of this BIFF record.

public void
setBuiltinStyle(int
style number (0-7)
builtinStyleId
)

if this is a builtin style set the number of the built in style

public void
setName(String
of the style
name
)

set the style's name

public void
setOutlineStyleLevel(int
The outline-level
level
)

set the row or column level of the style (if builtin 1||2)

public void
setXFIndex(int
of the xf record
xfIndex
)

set the actual index of the style extended format record

Inherited from org.apache.poi.hssf.record.StandardRecord:
getRecordSizeserialize

Field Detail

field_1_xf_indexback to summary
private int field_1_xf_index

shared by both user defined and built-in styles

field_2_builtin_styleback to summary
private int field_2_builtin_style
field_3_outline_style_levelback to summary
private int field_3_outline_style_level
field_3_stringHasMultibyteback to summary
private boolean field_3_stringHasMultibyte
field_4_nameback to summary
private String field_4_name
isBuiltinFlagback to summary
private static final BitField isBuiltinFlag
sidback to summary
public static final short sid
styleIndexMaskback to summary
private static final BitField styleIndexMask

Constructor Detail

StyleRecordback to summary
public StyleRecord()

creates a new style record, initially set to 'built-in'

StyleRecordback to summary
public StyleRecord(StyleRecord other)
StyleRecordback to summary
public StyleRecord(RecordInputStream in)

Method Detail

copyback to summary
public StyleRecord copy()

Implements abstract org.apache.poi.hssf.record.StandardRecord.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:StyleRecord

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
getDataSizeback to summary
protected int getDataSize()

Implements abstract org.apache.poi.hssf.record.StandardRecord.getDataSize.

Annotations
@Override
getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getGenericRecordTypeback to summary
public HSSFRecordTypes getGenericRecordType()

Overrides default org.apache.poi.common.usermodel.GenericRecord.getGenericRecordType.

Implements abstract org.apache.poi.hssf.record.Record.getGenericRecordType.

Annotations
@Override
getNameback to summary
public String getName()

get the style's name

Returns:String

name of the style

getSidback to summary
public short getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

Doc from org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

Returns:short

he id for this record

Annotations
@Override
getXFIndexback to summary
public int getXFIndex()

get the actual index of the style extended format record

Returns:int

index of the xf record

See Also
getXFIndex()
isBuiltinback to summary
public boolean isBuiltin()
serializeback to summary
public void serialize(LittleEndianOutput out)

Implements abstract org.apache.poi.hssf.record.StandardRecord.serialize.

Doc from org.apache.poi.hssf.record.StandardRecord.serialize.

Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.

The number of bytes written must equal the record size reported by org.apache.poi.hssf.record.Record#getRecordSize()} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).

Parameters
out:LittleEndianOutput

the output object

Annotations
@Override
setBuiltinStyleback to summary
public void setBuiltinStyle(int builtinStyleId)

if this is a builtin style set the number of the built in style

Parameters
builtinStyleId:int

style number (0-7)

setNameback to summary
public void setName(String name)

set the style's name

Parameters
name:String

of the style

setOutlineStyleLevelback to summary
public void setOutlineStyleLevel(int level)

set the row or column level of the style (if builtin 1||2)

Parameters
level:int

The outline-level

setXFIndexback to summary
public void setXFIndex(int xfIndex)

set the actual index of the style extended format record

Parameters
xfIndex:int

of the xf record