/** * Get the hidden state for a given column. * * @param columnIndex - the column to set (0-based) * @return hidden - <code>false</code> if the column is visible */ @Override public boolean isColumnHidden(int columnIndex) { CTCol col = columnHelper.getColumn(columnIndex, false); return col != null && col.getHidden(); }
private boolean isColumnGroupHiddenByParent(int idx) { CTCols cols = worksheet.getColsArray(0); // Look out outline details of end int endLevel = 0; boolean endHidden = false; int endOfOutlineGroupIdx = findEndOfColumnOutlineGroup(idx); CTCol[] colArray = cols.getColArray(); if (endOfOutlineGroupIdx < (colArray.length - 1)) { CTCol nextInfo = colArray[endOfOutlineGroupIdx + 1]; if (isAdjacentBefore(colArray[endOfOutlineGroupIdx], nextInfo)) { endLevel = nextInfo.getOutlineLevel(); endHidden = nextInfo.getHidden(); } } // Look out outline details of start int startLevel = 0; boolean startHidden = false; int startOfOutlineGroupIdx = findStartOfColumnOutlineGroup(idx); if (startOfOutlineGroupIdx > 0) { CTCol prevInfo = colArray[startOfOutlineGroupIdx - 1]; if (isAdjacentBefore(prevInfo, colArray[startOfOutlineGroupIdx])) { startLevel = prevInfo.getOutlineLevel(); startHidden = prevInfo.getHidden(); } } if (endLevel > startLevel) { return endHidden; } return startHidden; }
public void setColumnAttributes(CTCol fromCol, CTCol toCol) { if(fromCol.isSetBestFit()) toCol.setBestFit(fromCol.getBestFit()); if(fromCol.isSetCustomWidth()) toCol.setCustomWidth(fromCol.getCustomWidth()); if(fromCol.isSetHidden()) toCol.setHidden(fromCol.getHidden()); if(fromCol.isSetStyle()) toCol.setStyle(fromCol.getStyle()); if(fromCol.isSetWidth()) toCol.setWidth(fromCol.getWidth()); if(fromCol.isSetCollapsed()) toCol.setCollapsed(fromCol.getCollapsed()); if(fromCol.isSetPhonetic()) toCol.setPhonetic(fromCol.getPhonetic()); if(fromCol.isSetOutlineLevel()) toCol.setOutlineLevel(fromCol.getOutlineLevel()); toCol.setCollapsed(fromCol.isSetCollapsed()); }
boolean hiddenChanged = hidden != null && ci.getHidden() != hidden; boolean collapsedChanged = collapsed != null && ci.getCollapsed() != collapsed; boolean columnChanged = levelChanged || hiddenChanged || collapsedChanged || styleChanged;
/** * Get the hidden state for a given column. * * @param columnIndex - the column to set (0-based) * @return hidden - <code>false</code> if the column is visible */ @Override public boolean isColumnHidden(int columnIndex) { CTCol col = columnHelper.getColumn(columnIndex, false); return col != null && col.getHidden(); }
/** * Get the hidden state for a given column. * * @param columnIndex - the column to set (0-based) * @return hidden - <code>false</code> if the column is visible */ public boolean isColumnHidden(int columnIndex) { CTCol col = columnHelper.getColumn(columnIndex, false); return col != null && col.getHidden(); }
private boolean isColumnGroupHiddenByParent(int idx) { CTCols cols = worksheet.getColsArray(0); // Look out outline details of end int endLevel = 0; boolean endHidden = false; int endOfOutlineGroupIdx = findEndOfColumnOutlineGroup(idx); CTCol[] colArray = cols.getColArray(); if (endOfOutlineGroupIdx < (colArray.length - 1)) { CTCol nextInfo = colArray[endOfOutlineGroupIdx + 1]; if (isAdjacentBefore(colArray[endOfOutlineGroupIdx], nextInfo)) { endLevel = nextInfo.getOutlineLevel(); endHidden = nextInfo.getHidden(); } } // Look out outline details of start int startLevel = 0; boolean startHidden = false; int startOfOutlineGroupIdx = findStartOfColumnOutlineGroup(idx); if (startOfOutlineGroupIdx > 0) { CTCol prevInfo = colArray[startOfOutlineGroupIdx - 1]; if (isAdjacentBefore(prevInfo, colArray[startOfOutlineGroupIdx])) { startLevel = prevInfo.getOutlineLevel(); startHidden = prevInfo.getHidden(); } } if (endLevel > startLevel) { return endHidden; } return startHidden; }
public void setColumnAttributes(CTCol fromCol, CTCol toCol) { if(fromCol.isSetBestFit()) toCol.setBestFit(fromCol.getBestFit()); if(fromCol.isSetCustomWidth()) toCol.setCustomWidth(fromCol.getCustomWidth()); if(fromCol.isSetHidden()) toCol.setHidden(fromCol.getHidden()); if(fromCol.isSetStyle()) toCol.setStyle(fromCol.getStyle()); if(fromCol.isSetWidth()) toCol.setWidth(fromCol.getWidth()); if(fromCol.isSetCollapsed()) toCol.setCollapsed(fromCol.getCollapsed()); if(fromCol.isSetPhonetic()) toCol.setPhonetic(fromCol.getPhonetic()); if(fromCol.isSetOutlineLevel()) toCol.setOutlineLevel(fromCol.getOutlineLevel()); toCol.setCollapsed(fromCol.isSetCollapsed()); }
public void setColumnAttributes(CTCol fromCol, CTCol toCol) { if(fromCol.isSetBestFit()) toCol.setBestFit(fromCol.getBestFit()); if(fromCol.isSetCustomWidth()) toCol.setCustomWidth(fromCol.getCustomWidth()); if(fromCol.isSetHidden()) toCol.setHidden(fromCol.getHidden()); if(fromCol.isSetStyle()) toCol.setStyle(fromCol.getStyle()); if(fromCol.isSetWidth()) toCol.setWidth(fromCol.getWidth()); if(fromCol.isSetCollapsed()) toCol.setCollapsed(fromCol.getCollapsed()); if(fromCol.isSetPhonetic()) toCol.setPhonetic(fromCol.getPhonetic()); if(fromCol.isSetOutlineLevel()) toCol.setOutlineLevel(fromCol.getOutlineLevel()); toCol.setCollapsed(fromCol.isSetCollapsed()); }
boolean hiddenChanged = hidden != null && ci.getHidden() != hidden; boolean collapsedChanged = collapsed != null && ci.getCollapsed() != collapsed; boolean columnChanged = levelChanged || hiddenChanged || collapsedChanged || styleChanged;
&& ci.getOutlineLevel() != level; boolean hiddenChanged = hidden != null && ci.getHidden() != hidden; boolean collapsedChanged = collapsed != null && ci.getCollapsed() != collapsed;