Class GFXTextAttr
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GFXTextAttrstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intenumeration LineThroughCode.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intenumeration OverCode.static final intstatic final intstatic final intstatic final intstatic final intstatic final intenumeration StrikeoutCode.static final intstatic final intstatic final intstatic final intstatic final intstatic final intenumeration UnderCode.static final intstatic final intFields inherited from class com.adobe.xfa.gfx.GFXAttr
DEFAULT_SHADESCALE, STYLE_CROSS, STYLE_DASH, STYLE_DIAG_CROSS, STYLE_DIAG_LEFT, STYLE_DIAG_RIGHT, STYLE_DOT, STYLE_DOT_DASH, STYLE_DOT_DOT_DASH, STYLE_HORZ, STYLE_NONE, STYLE_SOLID, STYLE_UNKNOWN, STYLE_VERT -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.GFXTextAttr(int nNewUnderline, int nNewStyle, int lNewShade, GFXColour oNewColour, GFXColour oNewColourBg) Constructor.GFXTextAttr(int nNewUnderline, int nNewStyle, int lNewShade, GFXColour oNewColour, GFXColour oNewColourBg, int nNewStrikeout, int nNewOverline) Constructor.GFXTextAttr(GFXTextAttr oSource) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(GFXTextAttr oSource) Assigment operator.static GFXTextAttrGet a default Text Attribute.booleanEquality comparison operator.booleanequivalent(GFXTextAttr oCompare) Equality comparison.static GFXDecorationInfoextractDecoration(int nDecoration) Extract text decoration into usable values.inthashCode()booleanNon equality comparison operator.intoverline()Get the overline value for this attribute.voidoverline(int nNewOverline) Set the overline value for this attribute.intGet the strikeout value for this attribute.voidstrikeout(int nNewStrikeout) Set the strikeout value for this attribute.Return the text context associated with this graphic text attribute object.voidtextContext(GFXTextContext poTextContext) Set a new text context for this attribute object.intGet the underline value for this attribute.voidunderline(int nNewUnderline) Set the underline value for this attribute.Methods inherited from class com.adobe.xfa.gfx.GFXAttr
colour, colour, colourBg, colourBg, copyFrom, defaultShadeScale, equivalent, graphicContext, graphicContext, shade, shade, shadeColour, shadeScale, shadeScale, style, style
-
Field Details
-
UNDER_TYPE
public static final int UNDER_TYPEenumeration UnderCode.Low four bits are type (unknown, none, all or word). High four bits are style (single, double, strikeout). Combined by using bit-wise OR.
- See Also:
-
UNDER_UNKNOWN
public static final int UNDER_UNKNOWN- See Also:
-
UNDER_NONE
public static final int UNDER_NONE- See Also:
-
UNDER_ALL
public static final int UNDER_ALL- See Also:
-
UNDER_WORD
public static final int UNDER_WORD- See Also:
-
UNDER_STYLE
public static final int UNDER_STYLE- See Also:
-
UNDER_SINGLE
public static final int UNDER_SINGLE- See Also:
-
UNDER_DOUBLE
public static final int UNDER_DOUBLE- See Also:
-
LINETHROUGH_TYPE
public static final int LINETHROUGH_TYPEenumeration LineThroughCode.Low four bits are type (unknown, none, all or word). High four bits are style (single, double, strikeout). Combined by using bit-wise OR.
- See Also:
-
LINETHROUGH_UNKNOWN
public static final int LINETHROUGH_UNKNOWN- See Also:
-
LINETHROUGH_NONE
public static final int LINETHROUGH_NONE- See Also:
-
LINETHROUGH_ALL
public static final int LINETHROUGH_ALL- See Also:
-
LINETHROUGH_WORD
public static final int LINETHROUGH_WORD- See Also:
-
LINETHROUGH_STYLE
public static final int LINETHROUGH_STYLE- See Also:
-
LINETHROUGH_SINGLE
public static final int LINETHROUGH_SINGLE- See Also:
-
LINETHROUGH_DOUBLE
public static final int LINETHROUGH_DOUBLE- See Also:
-
OVER_TYPE
public static final int OVER_TYPEenumeration OverCode.Low four bits are type (unknown, none, all or word). High four bits are style (single, double, strikeout). Combined by using bit-wise OR.
- See Also:
-
OVER_UNKNOWN
public static final int OVER_UNKNOWN- See Also:
-
OVER_NONE
public static final int OVER_NONE- See Also:
-
OVER_ALL
public static final int OVER_ALL- See Also:
-
OVER_WORD
public static final int OVER_WORD- See Also:
-
OVER_STYLE
public static final int OVER_STYLE- See Also:
-
OVER_SINGLE
public static final int OVER_SINGLE- See Also:
-
OVER_DOUBLE
public static final int OVER_DOUBLE- See Also:
-
STRIKEOUT_UNKNOWN
public static final int STRIKEOUT_UNKNOWNenumeration StrikeoutCode.Legacy enumeration for inconsistent strikeout handling
- See Also:
-
STRIKEOUT_NONE
public static final int STRIKEOUT_NONE- See Also:
-
STRIKEOUT_SINGLE
public static final int STRIKEOUT_SINGLE- See Also:
-
STRIKEOUT_DOUBLE
public static final int STRIKEOUT_DOUBLE- See Also:
-
defaultTextAttr
-
-
Constructor Details
-
GFXTextAttr
public GFXTextAttr()Default constructor.Populates the graphic attribute with the following settings:
Underline = none Overline = none Strikeout = none -
GFXTextAttr
Copy constructor.Creates a new Text attribute with the same settings as the source attribute.
- Parameters:
oSource- Text attribute to copy
-
GFXTextAttr
public GFXTextAttr(int nNewUnderline, int nNewStyle, int lNewShade, GFXColour oNewColour, GFXColour oNewColourBg) Constructor.Creates a new Text attribute with the specified settings.
- Parameters:
nNewUnderline- The underline setting for this attributenNewStyle- The style setting for this attributelNewShade- The shade setting for this attributeoNewColour- The foreground colour to be usedoNewColourBg- The background colour to be used
-
GFXTextAttr
public GFXTextAttr(int nNewUnderline, int nNewStyle, int lNewShade, GFXColour oNewColour, GFXColour oNewColourBg, int nNewStrikeout, int nNewOverline) Constructor.Creates a new Text attribute with the specified settings.
- Parameters:
nNewUnderline- The underline setting for this attributenNewStyle- The style setting for this attributelNewShade- The shade setting for this attributeoNewColour- The foreground colour to be usedoNewColourBg- The background colour to be usednNewStrikeout- The strikeout setting for this attributenNewOverline- The overline setting for this attribute
-
-
Method Details
-
defaultText
Get a default Text Attribute.This will return a Text Attribute with the following settings:
Underline = none Style = solid Shade scale = maximum Foreground colour = black Background colour = white- Returns:
- A Text Attribute with default settings
-
underline
public int underline()Get the underline value for this attribute.- Returns:
- the underline value as a UnderCode enumeration
-
underline
public void underline(int nNewUnderline) Set the underline value for this attribute.- Parameters:
nNewUnderline- New underline value
-
overline
public int overline()Get the overline value for this attribute.- Returns:
- the overline value as a OverCode enumeration
-
overline
public void overline(int nNewOverline) Set the overline value for this attribute.- Parameters:
nNewOverline- New overline value
-
strikeout
public int strikeout()Get the strikeout value for this attribute.- Returns:
- The strikeout value as a StrikeoutCode enumeration
-
strikeout
public void strikeout(int nNewStrikeout) Set the strikeout value for this attribute.- Parameters:
nNewStrikeout- New strikeout value
-
textContext
Return the text context associated with this graphic text attribute object.- Returns:
- Pointer to the text context. A null pointer is returned if the context has never been set.
-
textContext
Set a new text context for this attribute object.- Parameters:
poTextContext- - New text context to associate with this graphic text attribute object.
-
equivalent
Equality comparison.Compares on an attribute value basis. Two attributes are considered equal if their values compare for equality.
- Parameters:
oCompare- Attribute object to compare against.- Returns:
- TRUE if all members are equal, FALSE otherwise.
-
equals
Equality comparison operator.Compares on an attribute value basis. Two attributes are considered equal if their values compare for equality.
-
hashCode
public int hashCode() -
notEqual
Non equality comparison operator.Compares on an attribute value basis. Two attributes are only considered equal if their values compare for equality.
- Parameters:
oCompare- Attribute object to compare against.- Returns:
- TRUE if the attribute objects are considered not equal; FALSE otherwise.
-
copyFrom
Assigment operator.Replace all attribute settings with those from the source object.
- Parameters:
oSource- Source attribute object to copy.
-
extractDecoration
Extract text decoration into usable values.Given an underline, line-through or overline value, extract the two component values from it for further processing.
- Parameters:
nDecoration- Input text decoration value.- Returns:
- TRUE if there is any decoration; FALSE if no decoration.
-