Public Member Functions | Protected Member Functions

de.softpro.doc.SignDocTextFieldAttributes Class Reference

Attributes of a text field, list box field or combo box field used for the construction of the appearance (PDF documents only). More...

List of all members.

Public Member Functions

 SignDocTextFieldAttributes () throws SignDocException
 Constructor.
synchronized Object clone () throws CloneNotSupportedException
 Clone this object.
synchronized boolean isSet () throws SignDocException
 Check if text field attributes are set or not.
synchronized boolean isValid () throws SignDocException
 Check if the text field attributes are valid.
synchronized void clear () throws SignDocException
 Unset all attributes.
synchronized String getFontName () throws SignDocException
 Get the name of the font.
synchronized void setFontName (String aFontName) throws SignDocException
 Set the name of the font.
synchronized String getFontResourceName () throws SignDocException
 Get the resource name of the font.
synchronized double getFontSize () throws SignDocException
 Get the font size.
synchronized void setFontSize (double aFontSize) throws SignDocException
 Set the font size.
synchronized SignDocColor getTextColor () throws SignDocException
 Get the text color.
synchronized void setTextColor (SignDocColor aTextColor) throws SignDocException
 Set the text color.
synchronized String getRest () throws SignDocException
 Get unparsed parts of default appearance string.
synchronized void setRest (String aInput) throws SignDocException
 Set unparsed parts of default appearance string.

Protected Member Functions

void finalize () throws Throwable
 Finalize this object.

Detailed Description

Attributes of a text field, list box field or combo box field used for the construction of the appearance (PDF documents only).

This class represents a PDF default appearance string.

Modifying an object of this type does not modify the underlying field or document. Use SignDocDocument.setTextFieldAttributes() or SignDocField.setTextFieldAttributes() to update the text attributes of a field or of the document.

See also:
SignDocDocument.getTextFieldAttributes(), SignDocDocument.setTextFieldAttributes(), SignDocField.getTextFieldAttributes(), SignDocField.setTextFieldAttributes()

Constructor & Destructor Documentation

de.softpro.doc.SignDocTextFieldAttributes.SignDocTextFieldAttributes (  ) throws SignDocException

Constructor.


Member Function Documentation

synchronized void de.softpro.doc.SignDocTextFieldAttributes.clear (  ) throws SignDocException

Unset all attributes.

isSet() will return false.

synchronized Object de.softpro.doc.SignDocTextFieldAttributes.clone (  ) throws CloneNotSupportedException

Clone this object.

Returns:
A clone of this object.
void de.softpro.doc.SignDocTextFieldAttributes.finalize (  ) throws Throwable [protected]

Finalize this object.

Do not call this method unless you know what you are doing.

synchronized String de.softpro.doc.SignDocTextFieldAttributes.getFontName (  ) throws SignDocException

Get the name of the font.

This function returns an empty string if isSet() would return false.

Returns:
The name of the font, "?" if the font is invalid.
See also:
getFontResourceName(), getFontSize(), setFontName()
synchronized String de.softpro.doc.SignDocTextFieldAttributes.getFontResourceName (  ) throws SignDocException

Get the resource name of the font.

This function returns an empty string if isSet() would return false.

Note that setting the resource name is not possible.

Returns:
The resource name of the font.
See also:
getFontName()
synchronized double de.softpro.doc.SignDocTextFieldAttributes.getFontSize (  ) throws SignDocException

Get the font size.

This function returns 0 if isSet() would return false.

Returns:
The font size (in user space units). If the font size is 0, the default font size (which depends on the field size) will be used.
See also:
getFontName(), setFontSize()
synchronized String de.softpro.doc.SignDocTextFieldAttributes.getRest (  ) throws SignDocException

Get unparsed parts of default appearance string.

If this function returns a non-empty string, there are unsupported operators in the default appearance string.

Returns:
Concatenated unparsed parts of the default appearance string, ie, the default appearance string sans font name, font size, and text color. If this function returns a non-empty string, it will start with a space character.
See also:
setRest()
synchronized SignDocColor de.softpro.doc.SignDocTextFieldAttributes.getTextColor (  ) throws SignDocException

Get the text color.

This function returns null if isSet() would return false.

Returns:
An object describing the text color or null if the text color is not available. Modfying the returned object won't change the SignDocTextFieldAttributes object.
See also:
setTextColor()
synchronized boolean de.softpro.doc.SignDocTextFieldAttributes.isSet (  ) throws SignDocException

Check if text field attributes are set or not.

If this function returns false for a SignDocTextFieldAttributes object retrieved from a text field, the document's default text field attributes will be used (if present).

This function returns false for all SignDocTextFieldAttributes objects retrieved from TIFF documents (but you can set the attributes anyway, making isSet() return true).

Returns:
true if any attribute is set, false if no attributes are set.
See also:
isValid()
synchronized boolean de.softpro.doc.SignDocTextFieldAttributes.isValid (  ) throws SignDocException

Check if the text field attributes are valid.

This function does not check if the font name refers to a valid font. This function does not check the string set by setRest().

Returns:
true if isSet() would return false or if all attributes are set and are valid, false otherwise.
See also:
isSet(), setRest()
synchronized void de.softpro.doc.SignDocTextFieldAttributes.setFontName ( String  aFontName ) throws SignDocException

Set the name of the font.

The font name can be the name of a standard font, the name of an already embedded font, or the name of a font defined by a font configuration file.

SignDocDocument.addSignature() ignores the font name set by this function if string parameter "FontName" of SignDocSignatureParameters is set to a non-empty value or if the "SignatureTemplate" element of the XML document given to blob parameter "Template" has a non-empty font-name attribute.

Parameters:
[in]aFontNameThe new font name.
See also:
getFontName(), setFontSize(), setTextColor(), SignDocDocumentLoader.loadFontConfigFile(), SignDocDocumentLoader.loadFontConfigEnvironment(), SignDocDocumentLoader.loadFontConfigStream()
synchronized void de.softpro.doc.SignDocTextFieldAttributes.setFontSize ( double  aFontSize ) throws SignDocException

Set the font size.

SignDocDocument.addSignature() ignores the font size set by this function and uses length parameter "FontSize" of SignDocSignatureParameters instead.

Parameters:
[in]aFontSizeThe font size (in user space units). If the font size is 0, the default font size (which depends on the field size) will be used.
See also:
getFontSize(), setFontName(), SignDocDocument.sff_fit_height_only
synchronized void de.softpro.doc.SignDocTextFieldAttributes.setRest ( String  aInput ) throws SignDocException

Set unparsed parts of default appearance string.

Parameters:
[in]aInputThe new string of unparsed operators. If this string is non-empty and does not start with a space character, a space character will be prepended automatically.
synchronized void de.softpro.doc.SignDocTextFieldAttributes.setTextColor ( SignDocColor  aTextColor ) throws SignDocException

Set the text color.

Parameters:
[in]aTextColorThe text color.

The documentation for this class was generated from the following file: