java.lang.Object
com.lowagie.text.pdf.BaseField
- Direct Known Subclasses:
PushbuttonField,RadioCheckField,TextField
Deprecated.
Common field variables.
- Author:
- Paulo Soares (psoares@consiste.pt)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intDeprecated.protected StringDeprecated.Holds the value of the alternate field name.protected ColorDeprecated.static final floatDeprecated.A medium border with 2 point width.static final floatDeprecated.A thick border with 3 point width.static final floatDeprecated.A thin border with 1 point width.protected ColorDeprecated.protected intDeprecated.protected floatDeprecated.protected RectangleDeprecated.static final intDeprecated.combo box flag.static final intDeprecated.The field will not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than will fit within its annotation rectangle.static final intDeprecated.The text entered in the field will not be spell-checked.static final intDeprecated.If set the combo box includes an editable text box as well as a drop list; if clear, it includes only a drop list.protected StringDeprecated.Holds value of property fieldName.static final intDeprecated.The text entered in the field represents the pathname of a file whose contents are to be submitted as the value of the field.protected BaseFontDeprecated.protected floatDeprecated.static final intDeprecated.The field is hidden.static final intDeprecated.The field is hidden but is printable.static final intDeprecated.The annotation flag: Invisible.static final intDeprecated.The annotation flag Hidden.protected StringDeprecated.Holds the value of the mapping field name.protected intDeprecated.Holds value of property maxCharacterLength.static final intDeprecated.The field may contain multiple lines of text.static final intDeprecated.whether or not a list may have multiple selections.static final intDeprecated.The annotation flag Hidden.protected intDeprecated.Holds value of property options.static final intDeprecated.The field is intended for entering a secure password that should not be echoed visibly to the screen.static final intDeprecated.The annotation flag Hidden.static final intDeprecated.The user may not change the value of the field.static final intDeprecated.The field must have a value at the time it is exported by a submit-form action.protected intDeprecated.Holds value of property rotation.protected StringDeprecated.protected ColorDeprecated.protected intDeprecated.Holds value of property visibility.static final intDeprecated.The field is visible.static final intDeprecated.The field is visible but does not print.protected PdfWriterDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbreakLines(List<String> breaks, BaseFont font, float fontSize, float width) Deprecated.intDeprecated.Gets the text horizontal alignment.getAllHardBreaks(String text) Deprecated.Deprecated.Gets the alternate field name.Deprecated.Gets the background color.protected static PdfAppearancegetBorderAppearance(PdfWriter writer, Rectangle box, int rotation, Color backgroundColor, int borderStyle, float borderWidth, Color borderColor, int options, int maxCharacterLength) Deprecated.Deprecated.Gets the border color.intDeprecated.Gets the border style.floatDeprecated.Gets the border width in points.getBox()Deprecated.Gets the field dimension and position.Deprecated.Gets the field name.getFont()Deprecated.Gets the text font.floatDeprecated.Gets the font size.Deprecated.Gets the mapping name.intDeprecated.Gets the maximum length of the field's text, in characters.intDeprecated.Gets the option flags.protected BaseFontDeprecated.intDeprecated.Gets the field rotation.getText()Deprecated.Gets the text.Deprecated.Gets the text color.intDeprecated.Gets the field visibility flag.Deprecated.Getter for property writer.static voidmoveFields(PdfDictionary from, PdfDictionary to) Deprecated.Moves the field keys fromfromtoto.voidsetAlignment(int alignment) Deprecated.Sets the text horizontal alignment.voidsetAlternateFieldName(String alternateFieldName) Deprecated.Sets the alternateFieldName field name.voidsetBackgroundColor(Color backgroundColor) Deprecated.Sets the background color.voidsetBorderColor(Color borderColor) Deprecated.Sets the border color.voidsetBorderStyle(int borderStyle) Deprecated.Sets the border style.voidsetBorderWidth(float borderWidth) Deprecated.Sets the border width in points.voidDeprecated.Sets the field dimension and position.voidsetFieldName(String fieldName) Deprecated.Sets the field name.voidDeprecated.Sets the text font.voidsetFontSize(float fontSize) Deprecated.Sets the font size.voidsetMappingName(String mappingName) Deprecated.Sets the mapping name.voidsetMaxCharacterLength(int maxCharacterLength) Deprecated.Sets the maximum length of the field's text, in characters.voidsetOptions(int options) Deprecated.Sets the option flags.voidsetRotation(int rotation) Deprecated.Sets the field rotation.voidsetRotationFromPage(Rectangle page) Deprecated.Convenience method to set the field rotation the same as the page rotation.voidDeprecated.Sets the text for text fields.voidsetTextColor(Color textColor) Deprecated.Sets the text color.voidsetVisibility(int visibility) Deprecated.Sets the field visibility flag.voidDeprecated.Setter for property writer.protected static voidtrimRight(StringBuffer buf) Deprecated.
-
Field Details
-
BORDER_WIDTH_THIN
public static final float BORDER_WIDTH_THINDeprecated.A thin border with 1 point width.- See Also:
-
BORDER_WIDTH_MEDIUM
public static final float BORDER_WIDTH_MEDIUMDeprecated.A medium border with 2 point width.- See Also:
-
BORDER_WIDTH_THICK
public static final float BORDER_WIDTH_THICKDeprecated.A thick border with 3 point width.- See Also:
-
VISIBLE
public static final int VISIBLEDeprecated.The field is visible.- See Also:
-
HIDDEN
public static final int HIDDENDeprecated.The field is hidden.- See Also:
-
VISIBLE_BUT_DOES_NOT_PRINT
public static final int VISIBLE_BUT_DOES_NOT_PRINTDeprecated.The field is visible but does not print.- See Also:
-
HIDDEN_BUT_PRINTABLE
public static final int HIDDEN_BUT_PRINTABLEDeprecated.The field is hidden but is printable.- See Also:
-
INVISIBLE
public static final int INVISIBLEDeprecated.The annotation flag: Invisible.- See Also:
-
PRINT
public static final int PRINTDeprecated.The annotation flag Hidden.- See Also:
-
NOVIEW
public static final int NOVIEWDeprecated.The annotation flag Hidden.- See Also:
-
LOCKED
public static final int LOCKEDDeprecated.The annotation flag Hidden.- See Also:
-
READ_ONLY
public static final int READ_ONLYDeprecated.The user may not change the value of the field.- See Also:
-
REQUIRED
public static final int REQUIREDDeprecated.The field must have a value at the time it is exported by a submit-form action.- See Also:
-
MULTILINE
public static final int MULTILINEDeprecated.The field may contain multiple lines of text. This flag is only meaningful with text fields.- See Also:
-
DO_NOT_SCROLL
public static final int DO_NOT_SCROLLDeprecated.The field will not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than will fit within its annotation rectangle. Once the field is full, no further text will be accepted.- See Also:
-
PASSWORD
public static final int PASSWORDDeprecated.The field is intended for entering a secure password that should not be echoed visibly to the screen.- See Also:
-
FILE_SELECTION
public static final int FILE_SELECTIONDeprecated.The text entered in the field represents the pathname of a file whose contents are to be submitted as the value of the field.- See Also:
-
DO_NOT_SPELL_CHECK
public static final int DO_NOT_SPELL_CHECKDeprecated.The text entered in the field will not be spell-checked. This flag is meaningful only in text fields and in combo fields with theEDITflag set.- See Also:
-
EDIT
public static final int EDITDeprecated.If set the combo box includes an editable text box as well as a drop list; if clear, it includes only a drop list. This flag is only meaningful with combo fields.- See Also:
-
MULTISELECT
public static final int MULTISELECTDeprecated.whether or not a list may have multiple selections. Only applies to /CH LIST fields, not combo boxes.- See Also:
-
COMB
public static final int COMBDeprecated.combo box flag.- See Also:
-
borderWidth
protected float borderWidthDeprecated. -
borderStyle
protected int borderStyleDeprecated. -
borderColor
Deprecated. -
backgroundColor
Deprecated. -
textColor
Deprecated. -
font
Deprecated. -
fontSize
protected float fontSizeDeprecated. -
alignment
protected int alignmentDeprecated. -
writer
Deprecated. -
text
Deprecated. -
box
Deprecated. -
rotation
protected int rotationDeprecated.Holds value of property rotation. -
visibility
protected int visibilityDeprecated.Holds value of property visibility. -
fieldName
Deprecated.Holds value of property fieldName. -
alternateFieldName
Deprecated.Holds the value of the alternate field name. (PDF attribute 'TU') -
mappingName
Deprecated.Holds the value of the mapping field name. (PDF attribute 'TM') -
options
protected int optionsDeprecated.Holds value of property options. -
maxCharacterLength
protected int maxCharacterLengthDeprecated.Holds value of property maxCharacterLength.
-
-
Constructor Details
-
BaseField
Deprecated.Creates a newTextField.- Parameters:
writer- the documentPdfWriterbox- the field location and dimensionsfieldName- the field name. Ifnullonly the widget keys will be included in the field allowing it to be used as a kid field.
-
-
Method Details
-
getBorderAppearance
protected static PdfAppearance getBorderAppearance(PdfWriter writer, Rectangle box, int rotation, Color backgroundColor, int borderStyle, float borderWidth, Color borderColor, int options, int maxCharacterLength) Deprecated. -
getAllHardBreaks
Deprecated. -
trimRight
Deprecated. -
breakLines
protected static List<String> breakLines(List<String> breaks, BaseFont font, float fontSize, float width) Deprecated. -
moveFields
Deprecated.Moves the field keys fromfromtoto. The moved keys are removed fromfrom.- Parameters:
from- the sourceto- the destination. It may benull
-
getRealFont
Deprecated.- Throws:
IOExceptionDocumentException
-
getBorderWidth
public float getBorderWidth()Deprecated.Gets the border width in points.- Returns:
- the border width in points
-
setBorderWidth
public void setBorderWidth(float borderWidth) Deprecated.Sets the border width in points. To eliminate the border set the border color tonull.- Parameters:
borderWidth- the border width in points
-
getBorderStyle
public int getBorderStyle()Deprecated.Gets the border style.- Returns:
- the border style
-
setBorderStyle
public void setBorderStyle(int borderStyle) Deprecated.Sets the border style. The styles are found inPdfBorderDictionaryand can beSTYLE_SOLID,STYLE_DASHED,STYLE_BEVELED,STYLE_INSETandSTYLE_UNDERLINE.- Parameters:
borderStyle- the border style
-
getBorderColor
Deprecated.Gets the border color.- Returns:
- the border color
-
setBorderColor
Deprecated.Sets the border color. Set tonullto remove the border.- Parameters:
borderColor- the border color
-
getBackgroundColor
Deprecated.Gets the background color.- Returns:
- the background color
-
setBackgroundColor
Deprecated.Sets the background color. Set tonullfor transparent background.- Parameters:
backgroundColor- the background color
-
getTextColor
Deprecated.Gets the text color.- Returns:
- the text color
-
setTextColor
Deprecated.Sets the text color. Ifnullthe color used will be black.- Parameters:
textColor- the text color
-
getFont
Deprecated.Gets the text font.- Returns:
- the text font
-
setFont
Deprecated.Sets the text font. Ifnullthen Helvetica will be used.- Parameters:
font- the text font
-
getFontSize
public float getFontSize()Deprecated.Gets the font size.- Returns:
- the font size
-
setFontSize
public void setFontSize(float fontSize) Deprecated.Sets the font size. If 0 then auto-sizing will be used but only for text fields.- Parameters:
fontSize- the font size
-
getAlignment
public int getAlignment()Deprecated.Gets the text horizontal alignment.- Returns:
- the text horizontal alignment
-
setAlignment
public void setAlignment(int alignment) Deprecated.Sets the text horizontal alignment. It can beElement.ALIGN_LEFT,Element.ALIGN_CENTERandElement.ALIGN_RIGHT.- Parameters:
alignment- the text horizontal alignment
-
getText
Deprecated.Gets the text.- Returns:
- the text
-
setText
Deprecated.Sets the text for text fields.- Parameters:
text- the text
-
getBox
Deprecated.Gets the field dimension and position.- Returns:
- the field dimension and position
-
setBox
Deprecated.Sets the field dimension and position.- Parameters:
box- the field dimension and position
-
getRotation
public int getRotation()Deprecated.Gets the field rotation.- Returns:
- the field rotation
-
setRotation
public void setRotation(int rotation) Deprecated.Sets the field rotation. This value should be the same as the page rotation where the field will be shown.- Parameters:
rotation- the field rotation
-
setRotationFromPage
Deprecated.Convenience method to set the field rotation the same as the page rotation.- Parameters:
page- the page
-
getVisibility
public int getVisibility()Deprecated.Gets the field visibility flag.- Returns:
- the field visibility flag
-
setVisibility
public void setVisibility(int visibility) Deprecated.Sets the field visibility flag. This flags can be one ofVISIBLE,HIDDEN,VISIBLE_BUT_DOES_NOT_PRINTandHIDDEN_BUT_PRINTABLE.- Parameters:
visibility- field visibility flag
-
getFieldName
Deprecated.Gets the field name.- Returns:
- the field name
-
setFieldName
Deprecated.Sets the field name.- Parameters:
fieldName- the field name. Ifnullonly the widget keys will be included in the field allowing it to be used as a kid field.
-
getAlternateFieldName
Deprecated.Gets the alternate field name. (PDF attribute TU)- Returns:
- the alternate field name
-
setAlternateFieldName
Deprecated.Sets the alternateFieldName field name.- Parameters:
alternateFieldName- the alternate field name.
-
getMappingName
Deprecated.Gets the mapping name. (PDF attribute TM)- Returns:
- the mapping field name
-
setMappingName
Deprecated.Sets the mapping name. (PDF TM)- Parameters:
mappingName- the mapping name.
-
getOptions
public int getOptions()Deprecated.Gets the option flags.- Returns:
- the option flags
-
setOptions
public void setOptions(int options) Deprecated.Sets the option flags. The option flags can be a combination by oring ofREAD_ONLY,REQUIRED,MULTILINE,DO_NOT_SCROLL,PASSWORD,FILE_SELECTION,DO_NOT_SPELL_CHECKandEDIT.- Parameters:
options- the option flags
-
getMaxCharacterLength
public int getMaxCharacterLength()Deprecated.Gets the maximum length of the field's text, in characters.- Returns:
- the maximum length of the field's text, in characters.
-
setMaxCharacterLength
public void setMaxCharacterLength(int maxCharacterLength) Deprecated.Sets the maximum length of the field's text, in characters. It is only meaningful for text fields.- Parameters:
maxCharacterLength- the maximum length of the field's text, in characters
-
getWriter
Deprecated.Getter for property writer.- Returns:
- Value of property writer.
-
setWriter
Deprecated.Setter for property writer.- Parameters:
writer- New value of property writer.
-