Class Button
- All Implemented Interfaces:
IFormField, IAbstractElement, IBlockElement, IElement, IPropertyContainer, IAccessibleElement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Colorprivate static final TextAlignmentprivate static final VerticalAlignmentprivate booleanIndicates if it's the button with only single line caption.Fields inherited from class FormField
tagPropertiesFields inherited from class AbstractElement
childElements, nextRenderer, stylesFields inherited from class ElementPropertyContainer
properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(IBlockElement element) Adds any block element to the div's contents.Adds an image to the div's contents.Gets theaccessibility properties.<T1> T1getDefaultProperty(int property) Gets the default property from this entity.booleanIndicates if this element represents an input with type button in html.protected IRendererCreates a new renderer instance.setSingleLineValue(String value) Sets passed string value to the single line button caption.Adds passed string value as paragraph to the button.Methods inherited from class FormField
getId, setAlternativeDescription, setHeight, setInteractive, setSize, setWidthMethods inherited from class AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumberMethods inherited from class ElementPropertyContainer
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getTransparentStrokeColor, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalicMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAbstractElement
getChildrenMethods inherited from interface IElement
createRendererSubTree, getRenderer, setNextRendererMethods inherited from interface IPropertyContainer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Field Details
-
DEFAULT_VERTICAL_ALIGNMENT
-
DEFAULT_TEXT_ALIGNMENT
-
DEFAULT_BACKGROUND_COLOR
-
singleLine
private boolean singleLineIndicates if it's the button with only single line caption.
-
-
Constructor Details
-
Button
-
-
Method Details
-
add
Adds any block element to the div's contents.- Parameters:
element- aBlockElement- Returns:
- this Element
-
add
-
isSingleLine
public boolean isSingleLine()Indicates if this element represents an input with type button in html.- Returns:
- true if it's the button with only one line caption.
-
setSingleLineValue
Sets passed string value to the single line button caption. Value will be clipped if it is not fit into single line. For multiple line value usesetValue(String). Note that when adding other elements to the button after this method is called, this added value can be multiline.- Parameters:
value- string value to be set as caption.- Returns:
- this same
Buttoninstance.
-
setValue
Adds passed string value as paragraph to the button. Value can be multiline if it is not fit into single line. For single line value usesetSingleLineValue(String). Note that the new value will replace all already added elements.- Specified by:
setValuein interfaceIFormField- Overrides:
setValuein classFormField<Button>- Parameters:
value- string value to be added into button.- Returns:
- this same
IFormFieldinstance
-
getDefaultProperty
public <T1> T1 getDefaultProperty(int property) Gets the default property from this entity.- Specified by:
getDefaultPropertyin interfaceIPropertyContainer- Overrides:
getDefaultPropertyin classFormField<Button>- Type Parameters:
T1- the return type associated with the property- Parameters:
property- the property to be retrieved- Returns:
- the default property value. If the default property is not defined,
nullwill be returned
-
getAccessibilityProperties
Gets theaccessibility properties. See alsoIAccessibleElement.- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
Creates a new renderer instance.- Specified by:
makeNewRendererin classAbstractElement<Button>- Returns:
- new
IRenderer
-