Class PdfCheckBoxRenderingStrategy
java.lang.Object
com.itextpdf.forms.form.renderer.checkboximpl.PdfCheckBoxRenderingStrategy
- All Implemented Interfaces:
ICheckBoxRenderingStrategy
public final class PdfCheckBoxRenderingStrategy
extends 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate float
calculateFontSize
(CheckBoxRenderer checkBoxRenderer, PdfFont fontContainingSymbols, String text, Rectangle rectangle, float borderWidth) void
drawCheckBoxContent
(DrawContext drawContext, CheckBoxRenderer checkBoxRenderer, Rectangle rectangle) Draws a check box icon.private void
drawZapfdingbatsIcon
(PdfFont fontContainingSymbols, String text, float fontSize, Rectangle rectangle, PdfCanvas canvas) private PdfFont
private static float
retrieveBorderWidth
(float defaultWidth, Border borderTop, Border borderRight, Border borderBottom, Border borderLeft)
-
Field Details
-
ZAPFDINGBATS_CHECKBOX_MAPPING
-
-
Constructor Details
-
PdfCheckBoxRenderingStrategy
public PdfCheckBoxRenderingStrategy()Creates a newPdfCheckBoxRenderingStrategy
instance.
-
-
Method Details
-
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
-
retrieveBorderWidth
-
loadFontContainingSymbols
-
calculateFontSize
private float calculateFontSize(CheckBoxRenderer checkBoxRenderer, PdfFont fontContainingSymbols, String text, Rectangle rectangle, float borderWidth) -
drawZapfdingbatsIcon
-