Package com.adobe.xfa.gfx
Class GFXAttr
java.lang.Object
com.adobe.xfa.gfx.GFXAttr
- Direct Known Subclasses:
GFXFillAttr,GFXLineAttr,GFXTextAttr
The graphic attribute object is a base class for different
display attributes and holds information about common attibute
values such as background and foreground colour, shading, style
etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intenumeration StyleCode: Specifies the style of the attributes.static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolour()Get the foreground colour for this attribute.voidSet the foreground colour for this attribute.colourBg()Get the background colour for this attribute.voidSet the background colour for this attribute.voidReplace all attributes with those from the source object.static intGet the default upper bound for shadingbooleanEquality comparison operator.booleanequivalent(GFXAttr oCompare) Equality comparison.Return the graphic context associated with this graphic attribute object.voidgraphicContext(GFXGraphicContext poGraphicContext) Set a new graphic context for this attribute object.inthashCode()intshade()Get the shading value for this attribute.voidshade(int lNewShade) Set the shading value for this attribute.Get the shading colour.intGet the upper bound for shading.voidshadeScale(int lNewScale) Set the upper bound for shading.intstyle()Get the style for this attributevoidstyle(int nNewStyle) Set the style for this attribute
-
Field Details
-
STYLE_UNKNOWN
public static final int STYLE_UNKNOWNenumeration StyleCode: Specifies the style of the attributes.STYLE_UNKNOWN to STYLE_DIAG_CROSS inclusive is valid for line, fill and text attributes. STYLE_DOT, STYLE_DASH, STYLE_DOT_DASH and STYLE_DOT_DOT_DASH are only valid style values for line attributes
- See Also:
-
STYLE_NONE
public static final int STYLE_NONE- See Also:
-
STYLE_SOLID
public static final int STYLE_SOLID- See Also:
-
STYLE_HORZ
public static final int STYLE_HORZ- See Also:
-
STYLE_VERT
public static final int STYLE_VERT- See Also:
-
STYLE_CROSS
public static final int STYLE_CROSS- See Also:
-
STYLE_DIAG_LEFT
public static final int STYLE_DIAG_LEFT- See Also:
-
STYLE_DIAG_RIGHT
public static final int STYLE_DIAG_RIGHT- See Also:
-
STYLE_DIAG_CROSS
public static final int STYLE_DIAG_CROSS- See Also:
-
STYLE_DOT
public static final int STYLE_DOT- See Also:
-
STYLE_DASH
public static final int STYLE_DASH- See Also:
-
STYLE_DOT_DASH
public static final int STYLE_DOT_DASH- See Also:
-
STYLE_DOT_DOT_DASH
public static final int STYLE_DOT_DOT_DASH- See Also:
-
DEFAULT_SHADESCALE
public static final int DEFAULT_SHADESCALE- See Also:
-
-
Constructor Details
-
GFXAttr
public GFXAttr()Default constructor.Populates the graphic attribute with the following settings:
Style = solid Shading scale = full shading Shade = solid Foreground colour = black Background colour = white -
GFXAttr
Copy consturctor.Copies all attribute values.
- Parameters:
oSource- Source attribute object to copy
-
GFXAttr
Constructor.Creates an Attribute object with the settings as specified by the input values.
- Parameters:
nNewStyle- Specifies the style of the attributelNewShade- Specifies the shade of the attributeoNewColour- Specifies the foreground colouroNewColourBg- Specifies the background colour
-
-
Method Details
-
colour
Get the foreground colour for this attribute.- Returns:
- The foreground colour as a
jfGfxColourobject
-
colour
Set the foreground colour for this attribute.- Parameters:
oNewColour- The new foreground colour as ajfGfxColourobject
-
colourBg
Get the background colour for this attribute.- Returns:
- The background colour as a
jfGfxColourobject
-
colourBg
Set the background colour for this attribute.- Parameters:
oNewColourBg- The new background colour as ajfGfxColourobject
-
shade
public int shade()Get the shading value for this attribute. This is a value between 0 (invisible) to the value of ShadeScale (solid).- Returns:
- The shading value
-
shade
public void shade(int lNewShade) Set the shading value for this attribute. This is a value between 0 (invisible) to the value of ShadeScale (solid).- Parameters:
lNewShade- The new shading value
-
shadeScale
public int shadeScale()Get the upper bound for shading.- Returns:
- The upper bound for shading.
-
shadeScale
public void shadeScale(int lNewScale) Set the upper bound for shading.- Parameters:
lNewScale- The new upper bound for shading.
-
shadeColour
Get the shading colour.- Returns:
- The shading colour as a
jfGfxColourobject
-
defaultShadeScale
public static int defaultShadeScale()Get the default upper bound for shading- Returns:
- The default upper bound for shading.
-
style
public int style()Get the style for this attribute- Returns:
- The style as a StyleCode enumeration
-
style
public void style(int nNewStyle) Set the style for this attribute- Parameters:
nNewStyle- The new style as a StyleCode enumeration
-
graphicContext
Return the graphic context associated with this graphic attribute object.- Returns:
- Pointer to the graphic context. A null pointer is returned if the context has never been set.
-
graphicContext
Set a new graphic context for this attribute object.- Parameters:
poGraphicContext- - New graphic context to associate with this graphic 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() -
copyFrom
Replace all attributes with those from the source object.The standard assignment copies everything, including enabled and disabled status. Graphic source information is also copied.
- Parameters:
oSource- Source attribute object to copy.
-