Class PdfCheckBoxRenderingStrategy
- java.lang.Object
-
- com.itextpdf.forms.form.renderer.checkboximpl.PdfCheckBoxRenderingStrategy
-
- All Implemented Interfaces:
ICheckBoxRenderingStrategy
public final class PdfCheckBoxRenderingStrategy extends java.lang.Object implements ICheckBoxRenderingStrategy
This class is used to draw a checkBox icon in PDF mode this is the default strategy for drawing a checkBox.
-
-
Field Summary
Fields Modifier and Type Field Description static BiMap<CheckBoxType,java.lang.String>
ZAPFDINGBATS_CHECKBOX_MAPPING
-
Constructor Summary
Constructors Constructor Description PdfCheckBoxRenderingStrategy()
Creates a newPdfCheckBoxRenderingStrategy
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private float
calculateFontSize(CheckBoxRenderer checkBoxRenderer, PdfFont fontContainingSymbols, java.lang.String text, Rectangle rectangle, float borderWidth)
void
drawCheckBoxContent(DrawContext drawContext, CheckBoxRenderer checkBoxRenderer, Rectangle rectangle)
Draws a check box icon.private void
drawZapfdingbatsIcon(PdfFont fontContainingSymbols, java.lang.String text, float fontSize, Rectangle rectangle, PdfCanvas canvas)
private PdfFont
loadFontContainingSymbols()
-
-
-
Field Detail
-
ZAPFDINGBATS_CHECKBOX_MAPPING
public static final BiMap<CheckBoxType,java.lang.String> ZAPFDINGBATS_CHECKBOX_MAPPING
-
-
Constructor Detail
-
PdfCheckBoxRenderingStrategy
public PdfCheckBoxRenderingStrategy()
Creates a newPdfCheckBoxRenderingStrategy
instance.
-
-
Method Detail
-
drawCheckBoxContent
public void drawCheckBoxContent(DrawContext drawContext, CheckBoxRenderer checkBoxRenderer, Rectangle rectangle)
Draws a check box icon.- Specified by:
drawCheckBoxContent
in interfaceICheckBoxRenderingStrategy
- Parameters:
drawContext
- the draw contextcheckBoxRenderer
- the checkBox rendererrectangle
- the rectangle where the icon should be drawn
-
loadFontContainingSymbols
private PdfFont loadFontContainingSymbols()
-
calculateFontSize
private float calculateFontSize(CheckBoxRenderer checkBoxRenderer, PdfFont fontContainingSymbols, java.lang.String text, Rectangle rectangle, float borderWidth)
-
-