Package org.apache.poi.hssf.record
Class SelectionRecord
- java.lang.Object
-
- org.apache.poi.hssf.record.RecordBase
-
- org.apache.poi.hssf.record.Record
-
- org.apache.poi.hssf.record.StandardRecord
-
- org.apache.poi.hssf.record.SelectionRecord
-
- All Implemented Interfaces:
Duplicatable,GenericRecord
public final class SelectionRecord extends StandardRecord
Shows the user's selection on the sheet for write set num refs to 0
-
-
Field Summary
Fields Modifier and Type Field Description static shortsid
-
Constructor Summary
Constructors Constructor Description SelectionRecord(int activeCellRow, int activeCellCol)Creates a default selection record (cell A1, in pane ID 3)SelectionRecord(RecordInputStream in)SelectionRecord(SelectionRecord other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectionRecordcopy()intgetActiveCellCol()get the active cell's colintgetActiveCellRef()get the active cell's reference numberintgetActiveCellRow()get the active cell's rowprotected intgetDataSize()Map<String,Supplier<?>>getGenericProperties()HSSFRecordTypesgetGenericRecordType()bytegetPane()shortgetSid()return the non static version of the id for this record.voidserialize(LittleEndianOutput out)Write the data content of this BIFF record.voidsetActiveCellCol(short col)set the active cell's colvoidsetActiveCellRef(short ref)set the active cell's reference numbervoidsetActiveCellRow(int row)set the active cell's rowvoidsetPane(byte pane)set which window pane this is for-
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
-
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
-
-
-
Field Detail
-
sid
public static final short sid
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SelectionRecord
public SelectionRecord(SelectionRecord other)
-
SelectionRecord
public SelectionRecord(int activeCellRow, int activeCellCol)Creates a default selection record (cell A1, in pane ID 3)- Parameters:
activeCellRow- the active cells row indexactiveCellCol- the active cells column index
-
SelectionRecord
public SelectionRecord(RecordInputStream in)
-
-
Method Detail
-
setPane
public void setPane(byte pane)
set which window pane this is for- Parameters:
pane- the window pane
-
setActiveCellRow
public void setActiveCellRow(int row)
set the active cell's row- Parameters:
row- number of active cell
-
setActiveCellCol
public void setActiveCellCol(short col)
set the active cell's col- Parameters:
col- number of active cell
-
setActiveCellRef
public void setActiveCellRef(short ref)
set the active cell's reference number- Parameters:
ref- number of active cell
-
getPane
public byte getPane()
- Returns:
- the pane ID which window pane this is for
-
getActiveCellRow
public int getActiveCellRow()
get the active cell's row- Returns:
- row number of active cell
-
getActiveCellCol
public int getActiveCellCol()
get the active cell's col- Returns:
- col number of active cell
-
getActiveCellRef
public int getActiveCellRef()
get the active cell's reference number- Returns:
- ref number of active cell
-
getDataSize
protected int getDataSize()
- Specified by:
getDataSizein classStandardRecord
-
serialize
public void serialize(LittleEndianOutput out)
Description copied from class:StandardRecordWrite 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
RecordBase.getRecordSize()} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).- Specified by:
serializein classStandardRecord- Parameters:
out- the output object
-
getSid
public short getSid()
Description copied from class:Recordreturn the non static version of the id for this record.
-
copy
public SelectionRecord copy()
- Specified by:
copyin interfaceDuplicatable- Specified by:
copyin classStandardRecord- Returns:
- a deep copy of the implementing class / instance
-
getGenericRecordType
public HSSFRecordTypes getGenericRecordType()
- Specified by:
getGenericRecordTypein interfaceGenericRecord- Specified by:
getGenericRecordTypein classRecord
-
-