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

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

Introduction

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

Prototype

public RadioCheckField(PdfWriter writer, Rectangle box, String fieldName, String onValue) 

Source Link

Document

Creates a new instance of RadioCheckField

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/*  w  w w  .  j a v  a 2 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());
}