// If both colSplit and rowSplit are zero then the existing freeze pane is removed
if(colSplit == 0 && rowSplit == 0){
windowTwo.setFreezePanes(false);
windowTwo.setFreezePanesNoSplit(false);
SelectionRecord sel = (SelectionRecord) findFirstRecordBySid(SelectionRecord.sid);
sel.setPane(PaneInformation.PANE_UPPER_LEFT);
return;
}
int loc = findFirstRecordLocBySid(WindowTwoRecord.sid);
PaneRecord pane = new PaneRecord();
pane.setX((short)colSplit);
pane.setY((short)rowSplit);
pane.setTopRow((short) topRow);
pane.setLeftColumn((short) leftmostColumn);
if (rowSplit == 0) {
pane.setTopRow((short)0);
pane.setActivePane((short)1);
} else if (colSplit == 0) {
pane.setLeftColumn((short)0);
pane.setActivePane((short)2);
} else {
pane.setActivePane((short)0);
}
_records.add(loc+1, pane);
windowTwo.setFreezePanes(true);
windowTwo.setFreezePanesNoSplit(true);
SelectionRecord sel = (SelectionRecord) findFirstRecordBySid(SelectionRecord.sid);
sel.setPane((byte)pane.getActivePane());
}