Class AbstractSelectFieldRenderer
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
AbstractSelectFieldthe model element
Methods
ApplyAccessibilityProperties(PdfFormField, PdfDocument)
Applies the accessibility properties to the form field.
protected virtual void ApplyAccessibilityProperties(PdfFormField formField, PdfDocument pdfDocument)
Parameters
formField
PdfFormFieldThe form field to which the accessibility properties should be applied.
pdfDocument
PdfDocumentThe document to which the form field belongs.
ApplyAcroField(DrawContext)
Applies the AcroField widget.
protected abstract void ApplyAcroField(DrawContext drawContext)
Parameters
drawContext
DrawContextthe draw context
CreateFlatRenderer()
Creates the flat renderer instance.
protected abstract IRenderer CreateFlatRenderer()
Returns
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
PdfDocumentthe 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
floatavailable height of the layout area
actualHeight
floatactual occupied height of the select field
isClippedHeight
boolindicates 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
PdfDocumentthe 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
IRendereroptions subtree to get selected options
Returns
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
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
ChoiceFormFieldBuilderChoiceFormFieldBuilder to set options to
field
AbstractSelectFieldAbstractSelectField 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
PdfDocumentthe document which contains form field.