Class GFXTextAttr
- java.lang.Object
-
- com.adobe.xfa.gfx.GFXAttr
-
- com.adobe.xfa.gfx.GFXTextAttr
-
public class GFXTextAttr extends GFXAttr
The graphic text attribute object holds information about attribute values specific for text drawing.
-
-
Field Summary
Fields Modifier and Type Field Description static GFXTextAttr
defaultTextAttr
static int
LINETHROUGH_ALL
static int
LINETHROUGH_DOUBLE
static int
LINETHROUGH_NONE
static int
LINETHROUGH_SINGLE
static int
LINETHROUGH_STYLE
static int
LINETHROUGH_TYPE
enumeration LineThroughCode.static int
LINETHROUGH_UNKNOWN
static int
LINETHROUGH_WORD
static int
OVER_ALL
static int
OVER_DOUBLE
static int
OVER_NONE
static int
OVER_SINGLE
static int
OVER_STYLE
static int
OVER_TYPE
enumeration OverCode.static int
OVER_UNKNOWN
static int
OVER_WORD
static int
STRIKEOUT_DOUBLE
static int
STRIKEOUT_NONE
static int
STRIKEOUT_SINGLE
static int
STRIKEOUT_UNKNOWN
enumeration StrikeoutCode.static int
UNDER_ALL
static int
UNDER_DOUBLE
static int
UNDER_NONE
static int
UNDER_SINGLE
static int
UNDER_STYLE
static int
UNDER_TYPE
enumeration UnderCode.static int
UNDER_UNKNOWN
static int
UNDER_WORD
-
Fields 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
Constructors Constructor Description GFXTextAttr()
Default 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyFrom(GFXTextAttr oSource)
Assigment operator.static GFXTextAttr
defaultText()
Get a default Text Attribute.boolean
equals(java.lang.Object object)
Equality comparison operator.boolean
equivalent(GFXTextAttr oCompare)
Equality comparison.static GFXDecorationInfo
extractDecoration(int nDecoration)
Extract text decoration into usable values.int
hashCode()
boolean
notEqual(java.lang.Object oCompare)
Non equality comparison operator.int
overline()
Get the overline value for this attribute.void
overline(int nNewOverline)
Set the overline value for this attribute.int
strikeout()
Get the strikeout value for this attribute.void
strikeout(int nNewStrikeout)
Set the strikeout value for this attribute.GFXTextContext
textContext()
Return the text context associated with this graphic text attribute object.void
textContext(GFXTextContext poTextContext)
Set a new text context for this attribute object.int
underline()
Get the underline value for this attribute.void
underline(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 Detail
-
UNDER_TYPE
public static final int UNDER_TYPE
enumeration 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:
- Constant Field Values
-
UNDER_UNKNOWN
public static final int UNDER_UNKNOWN
- See Also:
- Constant Field Values
-
UNDER_NONE
public static final int UNDER_NONE
- See Also:
- Constant Field Values
-
UNDER_ALL
public static final int UNDER_ALL
- See Also:
- Constant Field Values
-
UNDER_WORD
public static final int UNDER_WORD
- See Also:
- Constant Field Values
-
UNDER_STYLE
public static final int UNDER_STYLE
- See Also:
- Constant Field Values
-
UNDER_SINGLE
public static final int UNDER_SINGLE
- See Also:
- Constant Field Values
-
UNDER_DOUBLE
public static final int UNDER_DOUBLE
- See Also:
- Constant Field Values
-
LINETHROUGH_TYPE
public static final int LINETHROUGH_TYPE
enumeration 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:
- Constant Field Values
-
LINETHROUGH_UNKNOWN
public static final int LINETHROUGH_UNKNOWN
- See Also:
- Constant Field Values
-
LINETHROUGH_NONE
public static final int LINETHROUGH_NONE
- See Also:
- Constant Field Values
-
LINETHROUGH_ALL
public static final int LINETHROUGH_ALL
- See Also:
- Constant Field Values
-
LINETHROUGH_WORD
public static final int LINETHROUGH_WORD
- See Also:
- Constant Field Values
-
LINETHROUGH_STYLE
public static final int LINETHROUGH_STYLE
- See Also:
- Constant Field Values
-
LINETHROUGH_SINGLE
public static final int LINETHROUGH_SINGLE
- See Also:
- Constant Field Values
-
LINETHROUGH_DOUBLE
public static final int LINETHROUGH_DOUBLE
- See Also:
- Constant Field Values
-
OVER_TYPE
public static final int OVER_TYPE
enumeration 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:
- Constant Field Values
-
OVER_UNKNOWN
public static final int OVER_UNKNOWN
- See Also:
- Constant Field Values
-
OVER_NONE
public static final int OVER_NONE
- See Also:
- Constant Field Values
-
OVER_ALL
public static final int OVER_ALL
- See Also:
- Constant Field Values
-
OVER_WORD
public static final int OVER_WORD
- See Also:
- Constant Field Values
-
OVER_STYLE
public static final int OVER_STYLE
- See Also:
- Constant Field Values
-
OVER_SINGLE
public static final int OVER_SINGLE
- See Also:
- Constant Field Values
-
OVER_DOUBLE
public static final int OVER_DOUBLE
- See Also:
- Constant Field Values
-
STRIKEOUT_UNKNOWN
public static final int STRIKEOUT_UNKNOWN
enumeration StrikeoutCode.Legacy enumeration for inconsistent strikeout handling
- See Also:
- Constant Field Values
-
STRIKEOUT_NONE
public static final int STRIKEOUT_NONE
- See Also:
- Constant Field Values
-
STRIKEOUT_SINGLE
public static final int STRIKEOUT_SINGLE
- See Also:
- Constant Field Values
-
STRIKEOUT_DOUBLE
public static final int STRIKEOUT_DOUBLE
- See Also:
- Constant Field Values
-
defaultTextAttr
public static final GFXTextAttr defaultTextAttr
-
-
Constructor Detail
-
GFXTextAttr
public GFXTextAttr()
Default constructor.Populates the graphic attribute with the following settings:
Underline = none Overline = none Strikeout = none
-
GFXTextAttr
public GFXTextAttr(GFXTextAttr oSource)
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 Detail
-
defaultText
public static GFXTextAttr 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
public GFXTextContext 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
public void textContext(GFXTextContext poTextContext)
Set a new text context for this attribute object.- Parameters:
poTextContext
- - New text context to associate with this graphic text attribute object.
-
equivalent
public boolean equivalent(GFXTextAttr oCompare)
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
public boolean equals(java.lang.Object object)
Equality comparison operator.Compares on an attribute value basis. Two attributes are considered equal if their values compare for equality.
-
notEqual
public boolean notEqual(java.lang.Object oCompare)
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
public void copyFrom(GFXTextAttr oSource)
Assigment operator.Replace all attribute settings with those from the source object.
- Parameters:
oSource
- Source attribute object to copy.
-
extractDecoration
public static GFXDecorationInfo extractDecoration(int nDecoration)
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.
-
-