Table of Contents

Class AbstractSelectFieldRenderer

Namespace
iText.Forms.Form.Renderer
Assembly
itext.forms.dll

Abstract BlockRenderer for select form fields.

public abstract class AbstractSelectFieldRenderer : BlockRenderer, IRenderer, IPropertyContainer
Inheritance
AbstractSelectFieldRenderer
Implements
Derived
Inherited Members

Constructors

AbstractSelectFieldRenderer(AbstractSelectField)

Creates a new AbstractSelectFieldRenderer instance.

protected AbstractSelectFieldRenderer(AbstractSelectField modelElement)

Parameters

modelElement AbstractSelectField

the model element

Methods

ApplyAccessibilityProperties(PdfFormField, PdfDocument)

Applies the accessibility properties to the form field.

protected virtual void ApplyAccessibilityProperties(PdfFormField formField, PdfDocument pdfDocument)

Parameters

formField PdfFormField

The form field to which the accessibility properties should be applied.

pdfDocument PdfDocument

The document to which the form field belongs.

ApplyAcroField(DrawContext)

Applies the AcroField widget.

protected abstract void ApplyAcroField(DrawContext drawContext)

Parameters

drawContext DrawContext

the draw context

CreateFlatRenderer()

Creates the flat renderer instance.

protected abstract IRenderer CreateFlatRenderer()

Returns

IRenderer

IRenderer instance.

Draw(DrawContext)

public override void Draw(DrawContext drawContext)

Parameters

drawContext DrawContext

DrawChildren(DrawContext)

public override void DrawChildren(DrawContext drawContext)

Parameters

drawContext DrawContext

GetConformanceLevel(PdfDocument)

Gets the conformance level.

[Obsolete("since 8.0.4 will be return iText.Kernel.Pdf.IConformanceLevel")]
protected virtual PdfAConformanceLevel GetConformanceLevel(PdfDocument document)

Parameters

document PdfDocument

the document

Returns

PdfAConformanceLevel

the conformance level or null if the conformance level is not set.

Remarks

Gets the conformance level. If the conformance level is not set, the conformance level of the document is used.

GetFinalSelectFieldHeight(float, float, bool)

Returns final height of the select field.

protected virtual float GetFinalSelectFieldHeight(float availableHeight, float actualHeight, bool isClippedHeight)

Parameters

availableHeight float

available height of the layout area

actualHeight float

actual occupied height of the select field

isClippedHeight bool

indicates whether the layout area's height is clipped or not

Returns

float

final height of the select field.

GetGenericConformanceLevel(PdfDocument)

Gets the conformance level.

[Obsolete("since 8.0.4 will be renamed to getConformanceLevel()")]
protected virtual IConformanceLevel GetGenericConformanceLevel(PdfDocument document)

Parameters

document PdfDocument

the document

Returns

IConformanceLevel

the conformance level or null if the conformance level is not set.

Remarks

Gets the conformance level. If the conformance level is not set, the conformance level of the document is used.

GetLang()

Gets the accessibility language.

protected virtual string GetLang()

Returns

string

the accessibility language.

GetModelId()

Gets the model id.

protected virtual string GetModelId()

Returns

string

the model id.

GetOptionsMarkedSelected(IRenderer)

Gets options that are marked as selected from the select field options subtree.

protected virtual IList<IRenderer> GetOptionsMarkedSelected(IRenderer optionsSubTree)

Parameters

optionsSubTree IRenderer

options subtree to get selected options

Returns

IList<IRenderer>

selected options list.

IsFlatten()

Checks if form fields need to be flattened.

protected virtual bool IsFlatten()

Returns

bool

true, if fields need to be flattened.

Layout(LayoutContext)

public override LayoutResult Layout(LayoutContext layoutContext)

Parameters

layoutContext LayoutContext

Returns

LayoutResult

SetupBuilderValues(ChoiceFormFieldBuilder, AbstractSelectField)

Retrieve the options from select field (can be combo box or list box field) and set them to the form field builder.

protected virtual void SetupBuilderValues(ChoiceFormFieldBuilder builder, AbstractSelectField field)

Parameters

builder ChoiceFormFieldBuilder

ChoiceFormFieldBuilder to set options to

field AbstractSelectField

AbstractSelectField to retrieve the options from

WriteAcroFormFieldLangAttribute(PdfDocument)

Sets the form accessibility language identifier of the form element in case the document is tagged.

protected virtual void WriteAcroFormFieldLangAttribute(PdfDocument pdfDoc)

Parameters

pdfDoc PdfDocument

the document which contains form field.