@ Override public PdfFormField makeField ( ) throws IOException , DocumentException , VectorPrintException { switch ( getFieldtype ( ) ) { case TEXT : return ( ( TextField ) bf ) . getTextField ( ) ; case COMBO : return ( ( TextField ) bf ) . getComboField ( ) ; case LIST : return ( ( TextField ) bf ) . getListField ( ) ; case BUTTON : return ( ( PushbuttonField ) bf ) . getField ( ) ; case CHECKBOX : return ( ( RadioCheckField ) bf ) . getCheckField ( ) ; case RADIO : return ( ( RadioCheckField ) bf ) . getRadioField ( ) ; } throw new VectorPrintException ( String . format ( "cannot create pdfformfield from %s and %s" , ( bf != null ) ? bf . getClass ( ) : null , String . valueOf ( getFieldtype ( ) ) ) ) ; }
Create the PdfFormField that will be used to add a form field to the pdf .