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

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

Introduction

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

Prototype

public void setBorderColor(Color borderColor) 

Source Link

Document

Sets the border color.

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  va  2 s  .c o m*/

    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);
}