public void collapseRow(int rowNumber) { // Find the start of the group. int startRow = findStartOfRowOutlineGroup(rowNumber); RowRecord rowRecord = getRow(startRow); // Hide all the columns until the end of the group int nextRowIx = writeHidden(rowRecord, startRow); RowRecord row = getRow(nextRowIx); if (row == null) { row = createRow(nextRowIx); insertRow(row); } // Write collapse field row.setColapsed(true); }
public void expandRow(int rowNumber) { if (rowNumber == -1) return; // If it is already expanded do nothing. if (!isRowGroupCollapsed(rowNumber)) { return; } // Find the start of the group. int startIdx = findStartOfRowOutlineGroup(rowNumber); RowRecord row = getRow(startIdx); // Find the end of the group. int endIdx = findEndOfRowOutlineGroup(rowNumber); // expand: // collapsed bit must be unset // hidden bit gets unset _if_ surrounding groups are expanded you can determine // this by looking at the hidden bit of the enclosing group. You will have // to look at the start and the end of the current group to determine which // is the enclosing group // hidden bit only is altered for this outline level. ie. don't un-collapse contained groups if (!isRowGroupHiddenByParent(rowNumber)) { for (int i = startIdx; i <= endIdx; i++) { RowRecord otherRow = getRow(i); if (row.getOutlineLevel() == otherRow.getOutlineLevel() || !isRowGroupCollapsed(i)) { otherRow.setZeroHeight(false); } } } // Write collapse field getRow(endIdx + 1).setColapsed(false); }
public void collapseRow(int rowNumber) { // Find the start of the group. int startRow = findStartOfRowOutlineGroup(rowNumber); RowRecord rowRecord = getRow(startRow); // Hide all the columns until the end of the group int nextRowIx = writeHidden(rowRecord, startRow); RowRecord row = getRow(nextRowIx); if (row == null) { row = createRow(nextRowIx); insertRow(row); } // Write collapse field row.setColapsed(true); }
public void collapseRow(int rowNumber) { // Find the start of the group. int startRow = findStartOfRowOutlineGroup(rowNumber); RowRecord rowRecord = getRow(startRow); // Hide all the columns until the end of the group int nextRowIx = writeHidden(rowRecord, startRow); RowRecord row = getRow(nextRowIx); if (row == null) { row = createRow(nextRowIx); insertRow(row); } // Write collapse field row.setColapsed(true); }
public void collapseRow(int rowNumber) { // Find the start of the group. int startRow = findStartOfRowOutlineGroup(rowNumber); RowRecord rowRecord = getRow(startRow); // Hide all the columns until the end of the group int nextRowIx = writeHidden(rowRecord, startRow); RowRecord row = getRow(nextRowIx); if (row == null) { row = createRow(nextRowIx); insertRow(row); } // Write collapse field row.setColapsed(true); }
getRow(endIdx + 1).setColapsed(false);
public void expandRow(int rowNumber) { if (rowNumber == -1) return; // If it is already expanded do nothing. if (!isRowGroupCollapsed(rowNumber)) { return; } // Find the start of the group. int startIdx = findStartOfRowOutlineGroup(rowNumber); RowRecord row = getRow(startIdx); // Find the end of the group. int endIdx = findEndOfRowOutlineGroup(rowNumber); // expand: // collapsed bit must be unset // hidden bit gets unset _if_ surrounding groups are expanded you can determine // this by looking at the hidden bit of the enclosing group. You will have // to look at the start and the end of the current group to determine which // is the enclosing group // hidden bit only is altered for this outline level. ie. don't un-collapse contained groups if (!isRowGroupHiddenByParent(rowNumber)) { for (int i = startIdx; i <= endIdx; i++) { RowRecord otherRow = getRow(i); if (row.getOutlineLevel() == otherRow.getOutlineLevel() || !isRowGroupCollapsed(i)) { otherRow.setZeroHeight(false); } } } // Write collapse field getRow(endIdx + 1).setColapsed(false); }
getRow(endIdx + 1).setColapsed(false);