Search in sources :

Example 1 with Removal

use of org.apache.poi.util.Removal in project poi by apache.

the class RegionUtil method setBorderBottom.

/**
     * Sets the bottom border style for a region of cells by manipulating the cell style of the individual
     * cells on the bottom
     * 
     * @param border The new border
     * @param region The region that should have the border
     * @param sheet The sheet that the region is on.
     * @since POI 3.15 beta 2
     * @deprecated POI 3.16 beta 1. Use {@link #setBorderBottom(BorderStyle, CellRangeAddress, Sheet)}.
     */
@Removal(version = "3.18")
public static void setBorderBottom(int border, CellRangeAddress region, Sheet sheet) {
    int colStart = region.getFirstColumn();
    int colEnd = region.getLastColumn();
    int rowIndex = region.getLastRow();
    CellPropertySetter cps = new CellPropertySetter(CellUtil.BORDER_BOTTOM, border);
    Row row = CellUtil.getRow(rowIndex, sheet);
    for (int i = colStart; i <= colEnd; i++) {
        cps.setProperty(row, i);
    }
}
Also used : Row(org.apache.poi.ss.usermodel.Row) Removal(org.apache.poi.util.Removal)

Example 2 with Removal

use of org.apache.poi.util.Removal in project poi by apache.

the class XSSFSheet method setTabColor.

/**
     * Set background color of the sheet tab
     *
     * @param colorIndex  the indexed color to set, must be a constant from {@link org.apache.poi.ss.usermodel.IndexedColors}
     * @deprecated 3.15-beta2. Removed in 3.17. Use {@link #setTabColor(XSSFColor)}.
     */
@Deprecated
@Removal(version = "3.17")
public void setTabColor(int colorIndex) {
    IndexedColors indexedColor = IndexedColors.fromInt(colorIndex);
    XSSFColor color = new XSSFColor(indexedColor, getWorkbook().getStylesSource().getIndexedColors());
    setTabColor(color);
}
Also used : IndexedColors(org.apache.poi.ss.usermodel.IndexedColors) Removal(org.apache.poi.util.Removal)

Example 3 with Removal

use of org.apache.poi.util.Removal in project poi by apache.

the class RegionUtil method setBorderTop.

/**
     * Sets the top border style for a region of cells by manipulating the cell style of the individual
     * cells on the top
     * 
     * @param border The new border
     * @param region The region that should have the border
     * @param sheet The sheet that the region is on.
     * @since POI 3.15 beta 2
     * @deprecated 3.16 beta 1. Use {@link #setBorderTop(BorderStyle, CellRangeAddress, Sheet)}.
     */
@Removal(version = "3.18")
public static void setBorderTop(int border, CellRangeAddress region, Sheet sheet) {
    int colStart = region.getFirstColumn();
    int colEnd = region.getLastColumn();
    int rowIndex = region.getFirstRow();
    CellPropertySetter cps = new CellPropertySetter(CellUtil.BORDER_TOP, border);
    Row row = CellUtil.getRow(rowIndex, sheet);
    for (int i = colStart; i <= colEnd; i++) {
        cps.setProperty(row, i);
    }
}
Also used : Row(org.apache.poi.ss.usermodel.Row) Removal(org.apache.poi.util.Removal)

Aggregations

Removal (org.apache.poi.util.Removal)3 Row (org.apache.poi.ss.usermodel.Row)2 IndexedColors (org.apache.poi.ss.usermodel.IndexedColors)1