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 Details

  • Constructor Details

  • Method Details

    • drawCheckBoxContent

      public void drawCheckBoxContent(DrawContext drawContext, CheckBoxRenderer checkBoxRenderer, Rectangle rectangle)
      Draws a check box icon.
      Specified by:
      drawCheckBoxContent in interface ICheckBoxRenderingStrategy
      Parameters:
      drawContext - the draw context
      checkBoxRenderer - the checkBox renderer
      rectangle - the rectangle where the icon should be drawn
    • loadFontContainingSymbols

      private PdfFont loadFontContainingSymbols()
    • calculateFontSize

      private float calculateFontSize(CheckBoxRenderer checkBoxRenderer, PdfFont fontContainingSymbols, String text, Rectangle rectangle, float borderWidth)
    • drawZapfdingbatsIcon

      private void drawZapfdingbatsIcon(PdfFont fontContainingSymbols, String text, float fontSize, Rectangle rectangle, PdfCanvas canvas)