| Method from org.apache.cocoon.poi.hssf.record.ColumnInfoRecord Detail: |
protected void fillFields(byte[] data,
short size,
int offset) {
field_1_first_col = LittleEndian.getShort(data, 0 + offset);
field_2_last_col = LittleEndian.getShort(data, 2 + offset);
field_3_col_width = LittleEndian.getShort(data, 4 + offset);
field_4_xf_index = LittleEndian.getShort(data, 6 + offset);
field_5_options = LittleEndian.getShort(data, 8 + offset);
field_6_reserved = data[ 10 + offset ];
}
|
public boolean getCollapsed() {
return collapsed.isSet(field_5_options);
}
get whether the cells are collapsed |
public short getColumnWidth() {
return field_3_col_width;
}
get the columns' width in 1/256 of a character width |
public short getFirstColumn() {
return field_1_first_col;
}
get the first column this record defines formatting info for |
public boolean getHidden() {
return hidden.isSet(field_5_options);
}
get whether or not these cells are hidden |
public short getLastColumn() {
return field_2_last_col;
}
get the last column this record defines formatting info for |
public short getOptions() {
return field_5_options;
}
get the options bitfield - use the bitsetters instead |
public short getOutlineLevel() {
return outlevel.getShortValue(field_5_options);
}
get the outline level for the cells |
public short getSid() {
return sid;
}
|
public short getXFIndex() {
return field_4_xf_index;
}
get the columns' default format info |
public byte[] serialize() {
byte[] retval = new byte[ 16 ];
LittleEndian.putShort(retval, 0, sid);
LittleEndian.putShort(retval, 2, ( short ) 12);
LittleEndian.putShort(retval, 4, getFirstColumn());
LittleEndian.putShort(retval, 6, getLastColumn());
LittleEndian.putShort(retval, 8, getColumnWidth());
LittleEndian.putShort(retval, 10, getXFIndex());
LittleEndian.putShort(retval, 12, getOptions());
LittleEndian.putShort(retval, 14, ( short ) 0x0); // retval[14] = 0;
return retval;
}
|
public void setCollapsed(boolean iscollapsed) {
field_5_options = collapsed.setShortBoolean(field_5_options,
iscollapsed);
}
set whether the cells are collapsed |
public void setColumnWidth(short cw) {
field_3_col_width = cw;
}
set the columns' width in 1/256 of a character width |
public void setFirstColumn(short fc) {
field_1_first_col = fc;
}
set the first column this record defines formatting info for |
public void setHidden(boolean ishidden) {
field_5_options = hidden.setShortBoolean(field_5_options, ishidden);
}
set whether or not these cells are hidden |
public void setLastColumn(short lc) {
field_2_last_col = lc;
}
set the last column this record defines formatting info for |
public void setOptions(short options) {
field_5_options = options;
}
set the options bitfield - use the bitsetters instead |
public void setOutlineLevel(short olevel) {
field_5_options = outlevel.setShortValue(field_5_options, olevel);
}
set the outline level for the cells |
public void setXFIndex(short xfi) {
field_4_xf_index = xfi;
}
set the columns' default format info |
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[COLINFO]\n");
buffer.append("colfirst = ").append(getFirstColumn())
.append("\n");
buffer.append("collast = ").append(getLastColumn())
.append("\n");
buffer.append("colwidth = ").append(getColumnWidth())
.append("\n");
buffer.append("xfindex = ").append(getXFIndex()).append("\n");
buffer.append("options = ").append(getOptions()).append("\n");
buffer.append(" hidden = ").append(getHidden()).append("\n");
buffer.append(" olevel = ").append(getOutlineLevel())
.append("\n");
buffer.append(" collapsed = ").append(getCollapsed())
.append("\n");
buffer.append("[/COLINFO]\n");
return buffer.toString();
}
|
protected void validateSid(short id) {
if (id != sid)
{
throw new RecordFormatException("NOT A COLINFO RECORD!!");
}
}
|