Example usage for com.lowagie.text Rectangle setBorder

List of usage examples for com.lowagie.text Rectangle setBorder

Introduction

In this page you can find the example usage for com.lowagie.text Rectangle setBorder.

Prototype

public void setBorder(int border) 

Source Link

Document

Enables/Disables the border on the specified sides.

Usage

From source file:questions.tables.AlternateBackground.java

public void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart,
        PdfContentByte[] canvases) {/* www. j ava 2 s  .c o m*/
    int rows = widths.length;
    int columns;
    Rectangle rect;
    for (int row = headerRows + 1; row < rows; row += 2) {
        columns = widths[row].length - 1;
        rect = new Rectangle(widths[row][0], heights[row], widths[row][columns], heights[row + 1]);
        rect.setBackgroundColor(Color.YELLOW);
        rect.setBorder(Rectangle.NO_BORDER);
        canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);

    }
}