Example usage for com.lowagie.text.pdf BaseField setBorderWidth

List of usage examples for com.lowagie.text.pdf BaseField setBorderWidth

Introduction

In this page you can find the example usage for com.lowagie.text.pdf BaseField setBorderWidth.

Prototype

public void setBorderWidth(float borderWidth) 

Source Link

Document

Sets the border width in points.

Usage

From source file:buckley.compile.BorderModifier.java

License:Apache License

public void modify(BaseField iTextField, Field field, Document document) {
    Border border = field.getBorder();
    if (border == null)
        return;//from ww  w.j a v  a 2s.c om

    float width = 1.0f;
    Color color = Color.black;

    if (border.getWidth() != null) {
        width = border.getWidth();
    }

    if (border.getColor() != null) {
        color = border.getColor();
    }

    iTextField.setBorderColor(color);
    iTextField.setBorderWidth(width);
}