本文整理了Java中org.apache.poi.hssf.usermodel.HSSFSheet.validateColumn()
方法的一些代码示例,展示了HSSFSheet.validateColumn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFSheet.validateColumn()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFSheet
类名称:HSSFSheet
方法名:validateColumn
[英]Runs a bounds check for column numbers
[中]对列号运行边界检查
代码示例来源:origin: org.apache.poi/poi
/**
* Creates a split (freezepane). Any existing freezepane or split pane is overwritten.<p>
*
* If both colSplit and rowSplit are zero then the existing freeze pane is removed
*
* @param colSplit Horizonatal position of split.
* @param rowSplit Vertical position of split.
* @param leftmostColumn Left column visible in right pane.
* @param topRow Top row visible in bottom pane
*/
@Override
public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) {
validateColumn(colSplit);
validateRow(rowSplit);
if (leftmostColumn < colSplit)
throw new IllegalArgumentException("leftmostColumn parameter must not be less than colSplit parameter");
if (topRow < rowSplit)
throw new IllegalArgumentException("topRow parameter must not be less than leftmostColumn parameter");
getSheet().createFreezePane(colSplit, rowSplit, topRow, leftmostColumn);
}
代码示例来源:origin: org.apache.poi/poi
/**
* Sets a page break at the indicated column.
* Breaks occur above the specified row and left of the specified column inclusive.<p>
*
* For example, <code>sheet.setColumnBreak(2);</code> breaks the sheet into two parts
* with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);}
* breaks the sheet into two parts with first three rows (rownum=1...3) in the first part
* and rows starting with rownum=4 in the second.
*
* @param column the column to break, inclusive
*/
@Override
public void setColumnBreak(int column) {
validateColumn((short) column);
_sheet.getPageSettings().setColumnBreak((short) column, (short) 0, (short) SpreadsheetVersion.EXCEL97.getLastRowIndex());
}
代码示例来源:origin: com.haulmont.thirdparty/poi
/**
* Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
* <p/>
* <p>
* If both colSplit and rowSplit are zero then the existing freeze pane is removed
* </p>
*
* @param colSplit Horizonatal position of split.
* @param rowSplit Vertical position of split.
* @param leftmostColumn Left column visible in right pane.
* @param topRow Top row visible in bottom pane
*/
public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) {
validateColumn(colSplit);
validateRow(rowSplit);
if (leftmostColumn < colSplit)
throw new IllegalArgumentException("leftmostColumn parameter must not be less than colSplit parameter");
if (topRow < rowSplit)
throw new IllegalArgumentException("topRow parameter must not be less than leftmostColumn parameter");
getSheet().createFreezePane(colSplit, rowSplit, topRow, leftmostColumn);
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
*
* <p>
* If both colSplit and rowSplit are zero then the existing freeze pane is removed
* </p>
*
* @param colSplit Horizonatal position of split.
* @param rowSplit Vertical position of split.
* @param leftmostColumn Left column visible in right pane.
* @param topRow Top row visible in bottom pane
*/
public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) {
validateColumn(colSplit);
validateRow(rowSplit);
if (leftmostColumn < colSplit) throw new IllegalArgumentException("leftmostColumn parameter must not be less than colSplit parameter");
if (topRow < rowSplit) throw new IllegalArgumentException("topRow parameter must not be less than leftmostColumn parameter");
getSheet().createFreezePane( colSplit, rowSplit, topRow, leftmostColumn );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Creates a split (freezepane). Any existing freezepane or split pane is overwritten.<p>
*
* If both colSplit and rowSplit are zero then the existing freeze pane is removed
*
* @param colSplit Horizonatal position of split.
* @param rowSplit Vertical position of split.
* @param leftmostColumn Left column visible in right pane.
* @param topRow Top row visible in bottom pane
*/
@Override
public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) {
validateColumn(colSplit);
validateRow(rowSplit);
if (leftmostColumn < colSplit)
throw new IllegalArgumentException("leftmostColumn parameter must not be less than colSplit parameter");
if (topRow < rowSplit)
throw new IllegalArgumentException("topRow parameter must not be less than leftmostColumn parameter");
getSheet().createFreezePane(colSplit, rowSplit, topRow, leftmostColumn);
}
代码示例来源:origin: com.haulmont.thirdparty/poi
/**
* Sets a page break at the indicated column.
* Breaks occur above the specified row and left of the specified column inclusive.
* <p/>
* For example, <code>sheet.setColumnBreak(2);</code> breaks the sheet into two parts
* with columns A,B,C in the first and D,E,... in the second. Simuilar, <code>sheet.setRowBreak(2);</code>
* breaks the sheet into two parts with first three rows (rownum=1...3) in the first part
* and rows starting with rownum=4 in the second.
*
* @param column the column to break, inclusive
*/
public void setColumnBreak(int column) {
validateColumn((short) column);
_sheet.getPageSettings().setColumnBreak((short) column, (short) 0, (short) SpreadsheetVersion.EXCEL97.getLastRowIndex());
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Sets a page break at the indicated column.
* Breaks occur above the specified row and left of the specified column inclusive.
*
* For example, <code>sheet.setColumnBreak(2);</code> breaks the sheet into two parts
* with columns A,B,C in the first and D,E,... in the second. Simuilar, <code>sheet.setRowBreak(2);</code>
* breaks the sheet into two parts with first three rows (rownum=1...3) in the first part
* and rows starting with rownum=4 in the second.
*
* @param column the column to break, inclusive
*/
public void setColumnBreak(int column) {
validateColumn((short)column);
_sheet.getPageSettings().setColumnBreak((short)column, (short)0, (short) SpreadsheetVersion.EXCEL97.getLastRowIndex());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Sets a page break at the indicated column.
* Breaks occur above the specified row and left of the specified column inclusive.<p>
*
* For example, <code>sheet.setColumnBreak(2);</code> breaks the sheet into two parts
* with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);}
* breaks the sheet into two parts with first three rows (rownum=1...3) in the first part
* and rows starting with rownum=4 in the second.
*
* @param column the column to break, inclusive
*/
@Override
public void setColumnBreak(int column) {
validateColumn((short) column);
_sheet.getPageSettings().setColumnBreak((short) column, (short) 0, (short) SpreadsheetVersion.EXCEL97.getLastRowIndex());
}
内容来源于网络,如有侵权,请联系作者删除!