Methods Summary |
---|
public java.lang.Object | clone()
SelectionRecord rec = new SelectionRecord();
rec.field_1_pane = field_1_pane;
rec.field_2_row_active_cell = field_2_row_active_cell;
rec.field_3_col_active_cell = field_3_col_active_cell;
rec.field_4_ref_active_cell = field_4_ref_active_cell;
rec.field_5_num_refs = field_5_num_refs;
rec.field_6_refs = field_6_refs;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_pane = in.readByte();
//field_2_row_active_cell = LittleEndian.getShort(data, 1 + offset);
field_2_row_active_cell = in.readUShort();
field_3_col_active_cell = in.readShort();
field_4_ref_active_cell = in.readShort();
field_5_num_refs = in.readShort();
field_6_refs = new ArrayList(field_5_num_refs);
for (int i=0; i<field_5_num_refs; i++) {
field_6_refs.add(new Reference(in));
}
|
public short | getActiveCellCol()get the active cell's col
return field_3_col_active_cell;
|
public short | getActiveCellRef()get the active cell's reference number
return field_4_ref_active_cell;
|
public int | getActiveCellRow()get the active cell's row
return field_2_row_active_cell;
|
public short | getNumRefs()get the number of cell refs (we don't support selection so set to 0
return field_5_num_refs;
|
public byte | getPane()get which window pane this is for
return field_1_pane;
|
public int | getRecordSize()
return 19;
|
public short | getSid()
return sid;
|
public int | serialize(int offset, byte[] data)
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, ( short ) 15);
data[ 4 + offset ] = getPane();
//LittleEndian.putShort(data, 5 + offset, getActiveCellRow());
LittleEndian.putShort(data, 5 + offset, ( short ) getActiveCellRow());
LittleEndian.putShort(data, 7 + offset, getActiveCellCol());
LittleEndian.putShort(data, 9 + offset, getActiveCellRef());
LittleEndian.putShort(data, 11 + offset, ( short ) 1);
LittleEndian.putShort(data, 13 + offset, ( short ) getActiveCellRow());
LittleEndian.putShort(data, 15 + offset, ( short ) getActiveCellRow());
data[ 17 + offset ] = (byte)getActiveCellCol();
data[ 18 + offset ] = (byte)getActiveCellCol();
return getRecordSize();
|
public void | setActiveCellCol(short col)set the active cell's col
field_3_col_active_cell = col;
|
public void | setActiveCellRef(short ref)set the active cell's reference number
field_4_ref_active_cell = ref;
|
public void | setActiveCellRow(int row)set the active cell's row
field_2_row_active_cell = row;
|
public void | setNumRefs(short refs)set the number of cell refs (we don't support selection so set to 0
field_5_num_refs = refs;
|
public void | setPane(byte pane)set which window pane this is for
field_1_pane = pane;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[SELECTION]\n");
buffer.append(" .pane = ")
.append(Integer.toHexString(getPane())).append("\n");
buffer.append(" .activecellrow = ")
.append(Integer.toHexString(getActiveCellRow())).append("\n");
buffer.append(" .activecellcol = ")
.append(Integer.toHexString(getActiveCellCol())).append("\n");
buffer.append(" .activecellref = ")
.append(Integer.toHexString(getActiveCellRef())).append("\n");
buffer.append(" .numrefs = ")
.append(Integer.toHexString(getNumRefs())).append("\n");
buffer.append("[/SELECTION]\n");
return buffer.toString();
|
protected void | validateSid(short id)
if (id != sid)
{
throw new RecordFormatException("NOT A valid Selection RECORD");
}
|