Package com.itextpdf.text.pdf
Class PdfARadioCheckField
- java.lang.Object
-
- com.itextpdf.text.pdf.BaseField
-
- com.itextpdf.text.pdf.RadioCheckField
-
- com.itextpdf.text.pdf.PdfARadioCheckField
-
public class PdfARadioCheckField extends RadioCheckField
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
check
protected static java.lang.String
circle
protected static java.lang.String
cross
protected static java.lang.String
diamond
private static PdfName
off
protected static java.lang.String
square
protected static java.lang.String
star
protected static java.lang.String[]
typeStreams
-
Fields inherited from class com.itextpdf.text.pdf.RadioCheckField
checkType, TYPE_CHECK, TYPE_CIRCLE, TYPE_CROSS, TYPE_DIAMOND, TYPE_SQUARE, TYPE_STAR, typeChars
-
Fields inherited from class com.itextpdf.text.pdf.BaseField
alignment, backgroundColor, BORDER_WIDTH_MEDIUM, BORDER_WIDTH_THICK, BORDER_WIDTH_THIN, borderColor, borderStyle, borderWidth, box, COMB, DO_NOT_SCROLL, DO_NOT_SPELL_CHECK, EDIT, fieldName, FILE_SELECTION, font, fontSize, HIDDEN, HIDDEN_BUT_PRINTABLE, maxCharacterLength, MULTILINE, MULTISELECT, options, PASSWORD, READ_ONLY, REQUIRED, rotation, text, textColor, visibility, VISIBLE, VISIBLE_BUT_DOES_NOT_PRINT, writer
-
-
Constructor Summary
Constructors Constructor Description PdfARadioCheckField(PdfWriter writer, Rectangle box, java.lang.String fieldName, java.lang.String onValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfAppearance
getAppearance(boolean isRadio, boolean on)
Gets the field appearance.protected PdfFormField
getField(boolean isRadio)
Gets a radio or check field.protected BaseFont
getRealFont()
void
setCheckType(int checkType)
Sets the checked symbol.-
Methods inherited from class com.itextpdf.text.pdf.RadioCheckField
getAppearanceRadioCircle, getCheckField, getCheckType, getOnValue, getRadioField, getRadioGroup, isChecked, setChecked, setOnValue
-
Methods inherited from class com.itextpdf.text.pdf.BaseField
breakLines, getAlignment, getBackgroundColor, getBorderAppearance, getBorderColor, getBorderStyle, getBorderWidth, getBox, getFieldName, getFont, getFontSize, getHardBreaks, getMaxCharacterLength, getOptions, getRotation, getText, getTextColor, getVisibility, getWriter, moveFields, setAlignment, setBackgroundColor, setBorderColor, setBorderStyle, setBorderWidth, setBox, setFieldName, setFont, setFontSize, setMaxCharacterLength, setOptions, setRotation, setRotationFromPage, setText, setTextColor, setVisibility, setWriter, trimRight
-
-
-
-
Field Detail
-
off
private static final PdfName off
-
check
protected static final java.lang.String check
- See Also:
- Constant Field Values
-
circle
protected static final java.lang.String circle
- See Also:
- Constant Field Values
-
cross
protected static final java.lang.String cross
- See Also:
- Constant Field Values
-
diamond
protected static final java.lang.String diamond
- See Also:
- Constant Field Values
-
square
protected static final java.lang.String square
- See Also:
- Constant Field Values
-
star
protected static final java.lang.String star
- See Also:
- Constant Field Values
-
typeStreams
protected static java.lang.String[] typeStreams
-
-
Method Detail
-
getField
protected PdfFormField getField(boolean isRadio) throws java.io.IOException, DocumentException
Description copied from class:RadioCheckField
Gets a radio or check field.- Overrides:
getField
in classRadioCheckField
- Parameters:
isRadio
-true
to get a radio field,false
to get a check field- Returns:
- the field
- Throws:
java.io.IOException
- on errorDocumentException
- on error
-
setCheckType
public void setCheckType(int checkType)
Description copied from class:RadioCheckField
Sets the checked symbol. It can beTYPE_CHECK
,TYPE_CIRCLE
,TYPE_CROSS
,TYPE_DIAMOND
,TYPE_SQUARE
andTYPE_STAR
.- Overrides:
setCheckType
in classRadioCheckField
- Parameters:
checkType
- the checked symbol
-
getAppearance
public PdfAppearance getAppearance(boolean isRadio, boolean on) throws java.io.IOException, DocumentException
Description copied from class:RadioCheckField
Gets the field appearance.- Overrides:
getAppearance
in classRadioCheckField
- Parameters:
isRadio
-true
for a radio field andfalse
for a check fieldon
-true
for the checked state,false
otherwise- Returns:
- the appearance
- Throws:
java.io.IOException
- on errorDocumentException
- on error
-
getRealFont
protected BaseFont getRealFont() throws java.io.IOException, DocumentException
- Overrides:
getRealFont
in classBaseField
- Throws:
java.io.IOException
DocumentException
-
-