com.foxit.sdk.pdf.annots.DefaultAppearance Class Reference

Public Member Functions

 DefaultAppearance (int flags, Font font, float text_size, long text_color)
 Constructor, with parameters. More...
 
 DefaultAppearance ()
 Constructor.

 
 DefaultAppearance (DefaultAppearance default_appearance)
 Constructor, with another DefaultAppearance object. More...
 
int getFlags ()
 Get flags to indicate which properties of DefaultAppearance are meaningful. More...
 
Font getFont ()
 Get (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFont) Font for default appearance. More...
 
long getText_color ()
 Get (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagTextColor) Text color for default appearance. More...
 
float getText_size ()
 Get (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFontSize) 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 DefaultAppearance are meaningful. More...
 
void setFont (Font value)
 Set (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFont) Font for default appearance. More...
 
void setText_color (long value)
 Set (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagTextColor) Text color for default appearance. More...
 
void setText_size (float value)
 Set (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFontSize) Text size for default appearance. More...
 

Static Public Attributes

static final int e_FlagFont = 0x0001
 Indicates property pdf::DefaultAppearance::getFont is meaningful.
 
static final int e_FlagFontSize = 0x0004
 Indicates property pdf::DefaultAppearance::text_size is meaningful.
 
static final int e_FlagTextColor = 0x0002
 Indicates property pdf::DefaultAppearance::text_color 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
flagsFlags to indicate which properties of DefaultAppearance are meaningful. Please refer to values starting from e_FlagFont and this can be one or a combination of these values.
fontA valid Font object for default appearance when parameter flags includes e_FlagFont.
text_sizeFont size for default appearance. Please ensure this is above 0 when parameter flags includes e_FlagFontSize.
text_colorText color for default appearance. Format: 0xRRGGBB.

◆ DefaultAppearance() [2/2]

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

Constructor, with another DefaultAppearance object.

Parameters
default_appearanceAnother DefaultAppearance object.

Member Function Documentation

◆ getFlags()

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

Get flags to indicate which properties of DefaultAppearance are meaningful.

Please refer to values starting from e_FlagFont and this can be one or a combination of these values. 0 means no property of DefaultAppearance is meaningful.

Returns
Flags to indicate which properties of DefaultAppearance are meaningful.

◆ getFont()

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

Get (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFont) Font for default appearance.

Returns
(Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFont) 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 (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagTextColor) Text color for default appearance.

Returns
(Useful only when pdf::DefaultAppearance::setFlags includes e_FlagTextColor) Text color for default appearance. Format: 0xRRGGBB.

◆ getText_size()

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

Get (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFontSize) Text size for default appearance.

Returns
(Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFontSize) Text size for default appearance. It should be above 0 when it is useful.

◆ set()

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

Set value.

Parameters
flagsFlags to indicate which properties of DefaultAppearance are meaningful. Please refer to values starting from e_FlagFont and this can be one or a combination of these values.
fontFont for default appearance. Please ensure this is a valid Font object when parameter flags includes e_FlagFont.
text_sizeText size for default appearance. Please ensure this is above 0 when parameter flags includes e_FlagFontSize.
text_colorText 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 DefaultAppearance are meaningful.

Please refer to values starting from e_FlagFont and this can be one or a combination of these values. 0 means no property of DefaultAppearance is meaningful.

Parameters
[in]flagsFlags to indicate which properties of DefaultAppearance are meaningful.
Returns
None.

◆ setFont()

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

Set (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFont) Font for default appearance.

Parameters
[in]font(Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFont) 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 (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagTextColor) Text color for default appearance.

Parameters
[in]text_color(Useful only when pdf::DefaultAppearance::setFlags includes e_FlagTextColor) Text color for default appearance. Format: 0xRRGGBB.
Returns
None.

◆ setText_size()

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

Set (Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFontSize) Text size for default appearance.

Parameters
[in]text_size(Useful only when pdf::DefaultAppearance::setFlags includes e_FlagFontSize) Text size for default appearance. It should be above 0 when it is useful.
Returns
None.

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.