Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.pdf.annots.DefaultAppearance Class Reference

## Public Member Functions
| DefaultAppearance ()
| Constructor.
| DefaultAppearance (DefaultAppearance default_appearance)
| Constructor, with another default appearance object. More...
| DefaultAppearance (int flags, Font font, float text_size, long text_color)
| Constructor, with parameters. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
int | getFlags ()
| Get flags to indicate which properties of default appearance are meaningful. More...
Font | getFont ()
| Get a font for default appearance. More...
long | getText_color ()
| Get text color for default appearance. More...
float | getText_size ()
| Get text size for default appearance. More...
void | set (int flags, Font font, float text_size, long text_color)
| Set value. More...
void | setFlags (int value)
| Set flags to indicate which properties of default appearance are meaningful. More...
void | setFont (Font value)
| Set a font for default appearance. More...
void | setText_color (long value)
| Set text color for default appearance. More...
void | setText_size (float value)
| Set text size for default appearance. More...

## Static Public Attributes
static final int | e_FlagFont = 0x0001
| Indicates property font of com.foxit.sdk.pdf.annots.DefaultAppearance is meaningful.
static final int | e_FlagFontSize = 0x0004
| Indicates property text size of com.foxit.sdk.pdf.annots.DefaultAppearance is meaningful.
static final int | e_FlagTextColor = 0x0002
| Indicates property text color of com.foxit.sdk.pdf.annots.DefaultAppearance is meaningful.

## Detailed Description

This class represents default appearance data, which is used for free text annotation and form.

## Constructor & Destructor Documentation

## ◆ DefaultAppearance() [1/2]

com.foxit.sdk.pdf.annots.DefaultAppearance.DefaultAppearance | ( | int | flags,
|  | Font | font,
|  | float | text_size,
|  | long | text_color
| ) |  |

Constructor, with parameters.

Parameters

  [in] | flags | Flags to indicate which properties of default appearance are meaningful. Please refer to values starting from com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFont and this can be one or a combination of these values.
  [in] | font | A valid font object for default appearance when parameter flags includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFont .
  [in] | text_size | Font size for default appearance when parameter flags includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFontSize . Usually it should be above 0. For some objects, the size 0 has special meaning. Please refer to the comment of functions which are used to set default appearance data to other object.
  [in] | text_color | Text color for default appearance. Format: 0xRRGGBB.

## ◆ DefaultAppearance() [2/2]

com.foxit.sdk.pdf.annots.DefaultAppearance.DefaultAppearance | ( | DefaultAppearance | default_appearance | ) |

Constructor, with another default appearance object.

Parameters

  [in] | default_appearance | Another default appearance object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.pdf.annots.DefaultAppearance.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ getFlags()

com.foxit.sdk.pdf.annots.DefaultAppearance.getFlags | ( |  | ) |

Get flags to indicate which properties of default appearance are meaningful.

Please refer to values starting from com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFont and this can be one or a combination of these values. 0 means no property of default appearance is meaningful.

Returns
  Flags to indicate which properties of default appearance are meaningful.

## ◆ getFont()

com.foxit.sdk.pdf.annots.DefaultAppearance.getFont | ( |  | ) |

Get a font for default appearance.

Note
  Useful only when flags of current object includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFont .

Returns
  A font for default appearance. It should be a valid font object when it is useful.

## ◆ getText_color()

com.foxit.sdk.pdf.annots.DefaultAppearance.getText_color | ( |  | ) |

Get text color for default appearance.

Note
  Useful only when flags of current object includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagTextColor .

Returns
  Text color for default appearance. Format: 0xRRGGBB.

## ◆ getText_size()

com.foxit.sdk.pdf.annots.DefaultAppearance.getText_size | ( |  | ) |

Get text size for default appearance.

Usually it should be above 0 when it is useful. For some objects, the size 0 has special meaning. Please refer to the comment of functions which are used to set default appearance data to other object.

Note
  Useful only when flags of current object includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFontSize .

Returns
  Text size for default appearance.

## ◆ set()

void com.foxit.sdk.pdf.annots.DefaultAppearance.set | ( | int | flags,
|  | Font | font,
|  | float | text_size,
|  | long | text_color
| ) |  |

Set value.

Parameters

  [in] | flags | Flags to indicate which properties of default appearance are meaningful. Please refer to values starting from com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFont and this can be one or a combination of these values.
  [in] | font | A font for default appearance. Please ensure this is a valid font object when parameter flags includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFont .
  [in] | text_size | Font size for default appearance when parameter flags includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFontSize . Usually it should be above 0. For some objects, the size 0 has special meaning. Please refer to the comment of functions which are used to set default appearance data to other object.
  [in] | text_color | Text color for default appearance. Format: 0xRRGGBB.

Returns
  None.

## ◆ setFlags()

com.foxit.sdk.pdf.annots.DefaultAppearance.setFlags | ( | int | value | ) |

Set flags to indicate which properties of default appearance are meaningful.

Please refer to values starting from com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFont and this can be one or a combination of these values. 0 means no property of default appearance is meaningful.

Parameters

  [in] | value | Flags to indicate which properties of default appearance are meaningful.

Returns
  None.

## ◆ setFont()

com.foxit.sdk.pdf.annots.DefaultAppearance.setFont | ( | Font | value | ) |

Set a font for default appearance.

Note
  Useful only when flags of current object includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFont .

Parameters

  [in] | value | A font for default appearance. It should be a valid font object when it is useful.

Returns
  None.

## ◆ setText_color()

com.foxit.sdk.pdf.annots.DefaultAppearance.setText_color | ( | long | value | ) |

Set text color for default appearance.

Note
  Useful only when flags of current object includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagTextColor .

Parameters

  [in] | value | Text color for default appearance. Format: 0xRRGGBB.

Returns
  None.

## ◆ setText_size()

com.foxit.sdk.pdf.annots.DefaultAppearance.setText_size | ( | float | value | ) |

Set text size for default appearance.

Usually it should be above 0 when it is useful. For some objects, the size 0 has special meaning. Please refer to the comment of functions which are used to set default appearance data to other object.

Note
  Useful only when flags of current object includes com.foxit.sdk.pdf.annots.DefaultAppearance.e_FlagFontSize .

Parameters

  [in] | value | Text size for default appearance.

Returns
  None.