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

public Class LbsDataSubRecord

extends SubRecord
Class Inheritance
Imports
java.util.Collections, .LinkedHashMap, .Map, java.util.function.Supplier, org.apache.poi.common.Duplicatable, org.apache.poi.common.usermodel.GenericRecord, org.apache.poi.ss.formula.ptg.Ptg, org.apache.poi.util.GenericRecordJsonWriter, .GenericRecordUtil, .LittleEndianInput, .LittleEndianOutput, .RecordFormatException, .StringUtil

This structure specifies the properties of a list or drop-down list embedded object in a sheet.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
LbsDataSubRecord.LbsDropData

This structure specifies properties of the dropdown list control

Field Summary

Modifier and TypeField and Description
private boolean[]
_bsels

An optional array of booleans that specifies which items in the list are part of a multiple selection

private int
_cbFContinued

From [MS-XLS].pdf 2.5.147 FtLbsData: An unsigned integer that indirectly specifies whether some of the data in this structure appear in a subsequent Continue record.

private int
_cLines

An unsigned integer that specifies the number of items in the list.

private LbsDataSubRecord.LbsDropData
_dropData

An optional LbsDropData that specifies properties for this dropdown control.

private int
_flags

flags that tell what data follows

private int
_idEdit

An ObjId that specifies the edit box associated with this list.

private int
_iSel

An unsigned integer that specifies the one-based index of the first selected item in this list.

private Ptg
private String[]
_rgLines

An optional array of strings where each string specifies an item in the list.

private Byte
private int
_unknownPreFormulaInt

a formula that specifies the range of cell values that are the items in this list.

public static final int

Constructor Summary

AccessConstructor and Description
pack-priv
public
public
LbsDataSubRecord(LittleEndianInput
the stream to read data from
in
,
int
the seconf short in the record header
cbFContinued
,
int cmoOt)

Method Summary

Modifier and TypeMethod and Description
public LbsDataSubRecord
protected int
public Ptg

Returns:

the formula that specifies the range of cell values that are the items in this list.
getFormula
()

public Map<String, Supplier<?>>
public SubRecord.SubRecordTypes
public int

Returns:

the number of items in the list
getNumberOfItems
()

public boolean

Returns:

true as LbsDataSubRecord is always the last sub-record
isTerminating
()

Overrides org.apache.poi.hssf.record.SubRecord.isTerminating.

Whether this record terminates the sub-record stream.

public static LbsDataSubRecord

Returns:

a new instance of LbsDataSubRecord to construct auto-filters
newAutoFilterInstance
()

public void
Inherited from org.apache.poi.hssf.record.SubRecord:
createSubRecordgetMaxRecordLengthserializesetMaxRecordLengthtoString

Field Detail

_bselsback to summary
private boolean[] _bsels

An optional array of booleans that specifies which items in the list are part of a multiple selection

_cbFContinuedback to summary
private int _cbFContinued

From [MS-XLS].pdf 2.5.147 FtLbsData: An unsigned integer that indirectly specifies whether some of the data in this structure appear in a subsequent Continue record. If _cbFContinued is 0x00, all of the fields in this structure except sid and _cbFContinued MUST NOT exist. If this entire structure is contained within the same record, then _cbFContinued MUST be greater than or equal to the size, in bytes, of this structure, not including the four bytes for the ft and _cbFContinued fields

_cLinesback to summary
private int _cLines

An unsigned integer that specifies the number of items in the list.

_dropDataback to summary
private LbsDataSubRecord.LbsDropData _dropData

An optional LbsDropData that specifies properties for this dropdown control. This field MUST exist if and only if the containing Obj?s cmo.ot is equal to 0x14.

_flagsback to summary
private int _flags

flags that tell what data follows

_idEditback to summary
private int _idEdit

An ObjId that specifies the edit box associated with this list. A value of 0x00 specifies that there is no edit box associated with this list.

_iSelback to summary
private int _iSel

An unsigned integer that specifies the one-based index of the first selected item in this list. A value of 0x00 specifies there is no currently selected item.

_linkPtgback to summary
private Ptg _linkPtg
_rgLinesback to summary
private String[] _rgLines

An optional array of strings where each string specifies an item in the list. The number of elements in this array, if it exists, MUST be _cLines

_unknownPostFormulaByteback to summary
private Byte _unknownPostFormulaByte
_unknownPreFormulaIntback to summary
private int _unknownPreFormulaInt

a formula that specifies the range of cell values that are the items in this list.

sidback to summary
public static final int sid

Constructor Detail

LbsDataSubRecordback to summary
pack-priv LbsDataSubRecord()
LbsDataSubRecordback to summary
public LbsDataSubRecord(LbsDataSubRecord other)
LbsDataSubRecordback to summary
public LbsDataSubRecord(LittleEndianInput in, int cbFContinued, int cmoOt)
Parameters
in:LittleEndianInput

the stream to read data from

cbFContinued:int

the seconf short in the record header

cmoOt:int

the containing Obj's CommonObjectDataSubRecord#field_1_objectType

Method Detail

copyback to summary
public LbsDataSubRecord copy()

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

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

Returns:LbsDataSubRecord

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.SubRecord.getDataSize.

Returns:int

Doc from org.apache.poi.hssf.record.SubRecord.getDataSize.

the size of the data for this record (which is always 4 bytes less than the total record size). Note however, that ushort encoded after the record sid is usually but not always the data size.

Annotations
@Override
getFormulaback to summary
public Ptg getFormula()
Returns:Ptg

the formula that specifies the range of cell values that are the items in this list.

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

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

Annotations
@Override
getGenericRecordTypeback to summary
public SubRecord.SubRecordTypes getGenericRecordType()

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

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

Annotations
@Override
getNumberOfItemsback to summary
public int getNumberOfItems()
Returns:int

the number of items in the list

isTerminatingback to summary
public boolean isTerminating()

Overrides org.apache.poi.hssf.record.SubRecord.isTerminating.

Doc from org.apache.poi.hssf.record.SubRecord.isTerminating.

Whether this record terminates the sub-record stream. There are two cases when this method must be overridden and return true - EndSubRecord (sid = 0x00) - LbsDataSubRecord (sid = 0x12)

Returns:boolean

true as LbsDataSubRecord is always the last sub-record

Annotations
@Override
newAutoFilterInstanceback to summary
public static LbsDataSubRecord newAutoFilterInstance()
Returns:LbsDataSubRecord

a new instance of LbsDataSubRecord to construct auto-filters

See Also
org.apache.poi.hssf.usermodel.HSSFCombobox
serializeback to summary
public void serialize(LittleEndianOutput out)

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

Annotations
@Override
org.apache.poi.hssf.record back to summary

public Class LbsDataSubRecord.LbsDropData

extends Object
implements Duplicatable, GenericRecord
Class Inheritance
All Implemented Interfaces
org.apache.poi.common.usermodel.GenericRecord, org.apache.poi.common.Duplicatable

This structure specifies properties of the dropdown list control

Field Summary

Modifier and TypeField and Description
private int
_cLine

An unsigned integer that specifies the number of lines to be displayed in the dropdown.

private int
_dxMin

An unsigned integer that specifies the smallest width in pixels allowed for the dropdown window

private final String
_str

a string that specifies the current string value in the dropdown

private Byte
_unused

Optional, undefined and MUST be ignored.

private int
_wStyle

An unsigned integer that specifies the style of this dropdown.

public static final int
STYLE_COMBO_DROPDOWN

Combo dropdown control

public static final int
STYLE_COMBO_EDIT_DROPDOWN

Combo Edit dropdown control

public static final int
STYLE_COMBO_SIMPLE_DROPDOWN

Simple dropdown control (just the dropdown button)

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public LbsDataSubRecord.LbsDropData
public int
public Map<String, Supplier<?>>
public void
public void
setNumLines(int
the number of lines to be displayed in the dropdown
num
)

Set the number of lines to be displayed in the dropdown.

public void
setStyle(int
the style - see possible values
style
)

Set the style of this dropdown.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_cLineback to summary
private int _cLine

An unsigned integer that specifies the number of lines to be displayed in the dropdown.

_dxMinback to summary
private int _dxMin

An unsigned integer that specifies the smallest width in pixels allowed for the dropdown window

_strback to summary
private final String _str

a string that specifies the current string value in the dropdown

_unusedback to summary
private Byte _unused

Optional, undefined and MUST be ignored. This field MUST exist if and only if the size of str in bytes is an odd number

_wStyleback to summary
private int _wStyle

An unsigned integer that specifies the style of this dropdown.

STYLE_COMBO_DROPDOWNback to summary
public static final int STYLE_COMBO_DROPDOWN

Combo dropdown control

STYLE_COMBO_EDIT_DROPDOWNback to summary
public static final int STYLE_COMBO_EDIT_DROPDOWN

Combo Edit dropdown control

STYLE_COMBO_SIMPLE_DROPDOWNback to summary
public static final int STYLE_COMBO_SIMPLE_DROPDOWN

Simple dropdown control (just the dropdown button)

Constructor Detail

LbsDropDataback to summary
public LbsDropData()
LbsDropDataback to summary
public LbsDropData(LbsDataSubRecord.LbsDropData other)
LbsDropDataback to summary
public LbsDropData(LittleEndianInput in)

Method Detail

copyback to summary
public LbsDataSubRecord.LbsDropData copy()

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

Returns:LbsDataSubRecord.LbsDropData

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

a deep copy of the implementing class / instance

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

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

Annotations
@Override
serializeback to summary
public void serialize(LittleEndianOutput out)
setNumLinesback to summary
public void setNumLines(int num)

Set the number of lines to be displayed in the dropdown.

Parameters
num:int

the number of lines to be displayed in the dropdown

setStyleback to summary
public void setStyle(int style)

Set the style of this dropdown.

Possible values:

  • 0: Combo dropdown control
  • 1: Combo Edit dropdown control
  • 2: Simple dropdown control (just the dropdown button)
Parameters
style:int

the style - see possible values

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override