Example usage for com.itextpdf.text.pdf TextField TextField

List of usage examples for com.itextpdf.text.pdf TextField TextField

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf TextField TextField.

Prototype

public TextField(PdfWriter writer, Rectangle box, String fieldName) 

Source Link

Document

Creates a new TextField.

Usage

From source file:com.vectorprint.report.itext.style.stylers.AbstractFieldStyler.java

License:Open Source License

/**
 * creates the correct BaseField based on the {@link FIELDTYPE} of this styler.
 *
 * @return// www.  jav  a2 s . com
 * @throws VectorPrintException
 */
@Override
public BaseField create() throws VectorPrintException {
    switch (getFieldtype()) {
    case TEXT:
    case COMBO:
    case LIST:
        return new TextField(getWriter(), null, getName());
    case BUTTON:
        return new PushbuttonField(getWriter(), null, getName());
    case CHECKBOX:
    case RADIO:
        return new RadioCheckField(getWriter(), null, getName(), "Yes");
    }
    throw new VectorPrintException("unable to create BaseField for " + getFieldtype());
}