public class CheckBoxRenderer extends AbstractFormFieldRenderer
AbstractFormFieldRenderer implementation for checkboxes.| Modifier and Type | Class and Description |
|---|---|
protected class |
CheckBoxRenderer.FlatParagraphRenderer
A flat renderer for the checkbox.
|
| Modifier and Type | Field and Description |
|---|---|
static float |
DEFAULT_BORDER_WIDTH |
flatRendererchildRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, OVERLAP_EPSILON, parent, positionedRenderers, properties| Constructor and Description |
|---|
CheckBoxRenderer(CheckBox modelElement)
Creates a new
CheckBoxRenderer instance. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
adjustFieldLayout(LayoutContext layoutContext)
Adjusts the field layout.
|
protected void |
applyAcroField(DrawContext drawContext)
Applies the AcroField widget.
|
protected Rectangle |
applyBorderBox(Rectangle rect,
Border[] borders,
boolean reverse) |
protected Rectangle |
applyPaddings(Rectangle rect,
UnitValue[] paddings,
boolean reverse)
Applies given paddings to the given rectangle.
|
ICheckBoxRenderingStrategy |
createCheckBoxRenderStrategy()
creates a ICheckBoxRenderingStrategy based on the current settings.
|
IRenderer |
createFlatRenderer()
Creates a flat renderer for the checkbox.
|
void |
drawBackground(DrawContext drawContext) |
void |
drawBorder(DrawContext drawContext) |
CheckBoxType |
getCheckBoxType()
Gets the checkBoxType.
|
IRenderer |
getNextRenderer() |
RenderingMode |
getRenderingMode()
Gets the rendering mode of the checkbox.
|
boolean |
isBoxChecked()
Defines whether the box is checked or not.
|
protected boolean |
isLayoutBasedOnFlatRenderer()
Determines, whether the layout is based in the renderer itself or flat renderer.
|
applyAccessibilityProperties, draw, drawChildren, getConformance, getDefaultValue, getLang, getMinMaxWidth, getModelId, isFlatten, isRendererFit, layout, writeAcroFormFieldLangAttributeapplyRotationLayout, applyVerticalAlignment, beginRotationIfApplied, createOverflowRenderer, createRotationTransformInsideOccupiedArea, createSplitRenderer, endRotationIfApplied, getOccupiedAreaBBox, getResolvedFontaddAllProperties, addChild, alignChildHorizontally, allowLastYLineRecursiveExtraction, applyAbsolutePosition, applyAction, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, beginTransformationIfApplied, calculateAbsolutePdfBBox, calculateBBox, calculateShiftToPositionBBoxOfPointsAt, clipBackgroundArea, clipBackgroundArea, clipBorderArea, createXObject, deleteOwnProperty, deleteProperty, endElementOpacityApplying, endTransformationIfApplied, getBackgroundArea, getBorderAreaBBox, getBorderRadii, getBorders, getChildRenderers, getDefaultProperty, getFirstYLineRecursively, getInnerAreaBBox, getLastYLineRecursively, getMargins, getModelElement, getOccupiedArea, getOwnProperties, getOwnProperty, getPaddings, getParent, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, getPropertyAsTransparentColor, getPropertyAsUnitValue, hasAbsoluteUnitValue, hasOwnOrModelProperty, hasOwnProperty, hasProperty, hasRelativeUnitValue, initElementAreas, isAbsolutePosition, isBorderBoxSizing, isFirstOnRootArea, isFixedLayout, isFlushed, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isNotFittingWidth, isOverflowFit, isOverflowProperty, isOverflowProperty, isOverflowProperty, isPositioned, isRelativePosition, isStaticLayout, move, rectangleToPointsList, retrieveHeight, retrieveMaxHeight, retrieveMaxWidth, retrieveMinHeight, retrieveMinWidth, retrieveUnitValue, retrieveUnitValue, retrieveWidth, setBorders, setMinMaxWidthBasedOnFixedWidth, setParent, setProperty, toString, transformPoints, updateHeight, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidthpublic static final float DEFAULT_BORDER_WIDTH
public CheckBoxRenderer(CheckBox modelElement)
CheckBoxRenderer instance.modelElement - the model elementpublic IRenderer getNextRenderer()
public RenderingMode getRenderingMode()
public CheckBoxType getCheckBoxType()
public ICheckBoxRenderingStrategy createCheckBoxRenderStrategy()
public void drawBackground(DrawContext drawContext)
drawBackground in class AbstractRendererpublic void drawBorder(DrawContext drawContext)
drawBorder in class AbstractRendererprotected Rectangle applyBorderBox(Rectangle rect, Border[] borders, boolean reverse)
applyBorderBox in class AbstractRendererpublic boolean isBoxChecked()
protected void adjustFieldLayout(LayoutContext layoutContext)
adjustFieldLayout in class AbstractFormFieldRendererlayoutContext - layout contextprotected Rectangle applyPaddings(Rectangle rect, UnitValue[] paddings, boolean reverse)
applyPaddings in class AbstractRendererrect - a rectangle paddings will be applied on.paddings - the paddings to be applied on the given rectanglereverse - indicates whether paddings will be applied
inside (in case of false) or outside (in case of true) the rectangle.public IRenderer createFlatRenderer()
createFlatRenderer in class AbstractFormFieldRendererprotected void applyAcroField(DrawContext drawContext)
applyAcroField in class AbstractFormFieldRendererdrawContext - the draw contextprotected boolean isLayoutBasedOnFlatRenderer()
isLayoutBasedOnFlatRenderer in class AbstractFormFieldRenderertrue if layout is based on flat renderer, false otherwise.Copyright © 1998–2024 Apryse Group NV. All rights reserved.