public class GFXAttr extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SHADESCALE |
static int |
STYLE_CROSS |
static int |
STYLE_DASH |
static int |
STYLE_DIAG_CROSS |
static int |
STYLE_DIAG_LEFT |
static int |
STYLE_DIAG_RIGHT |
static int |
STYLE_DOT |
static int |
STYLE_DOT_DASH |
static int |
STYLE_DOT_DOT_DASH |
static int |
STYLE_HORZ |
static int |
STYLE_NONE |
static int |
STYLE_SOLID |
static int |
STYLE_UNKNOWN
enumeration StyleCode: Specifies the style of the attributes.
|
static int |
STYLE_VERT |
| Constructor and Description |
|---|
GFXAttr()
Default constructor.
|
GFXAttr(GFXAttr oSource)
Copy consturctor.
|
GFXAttr(int nNewStyle,
int lNewShade,
GFXColour oNewColour,
GFXColour oNewColourBg)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
GFXColour |
colour()
Get the foreground colour for this attribute.
|
void |
colour(GFXColour oNewColour)
Set the foreground colour for this attribute.
|
GFXColour |
colourBg()
Get the background colour for this attribute.
|
void |
colourBg(GFXColour oNewColourBg)
Set the background colour for this attribute.
|
void |
copyFrom(GFXAttr oSource)
Replace all attributes with those from the source object.
|
static int |
defaultShadeScale()
Get the default upper bound for shading
|
boolean |
equals(Object object)
Equality comparison operator.
|
boolean |
equivalent(GFXAttr oCompare)
Equality comparison.
|
GFXGraphicContext |
graphicContext()
Return the graphic context associated with this graphic attribute
object.
|
void |
graphicContext(GFXGraphicContext poGraphicContext)
Set a new graphic context for this attribute object.
|
int |
hashCode() |
int |
shade()
Get the shading value for this attribute.
|
void |
shade(int lNewShade)
Set the shading value for this attribute.
|
GFXColour |
shadeColour()
Get the shading colour.
|
int |
shadeScale()
Get the upper bound for shading.
|
void |
shadeScale(int lNewScale)
Set the upper bound for shading.
|
int |
style()
Get the style for this attribute
|
void |
style(int nNewStyle)
Set the style for this attribute
|
public static final int STYLE_UNKNOWN
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
public static final int STYLE_NONE
public static final int STYLE_SOLID
public static final int STYLE_HORZ
public static final int STYLE_VERT
public static final int STYLE_CROSS
public static final int STYLE_DIAG_LEFT
public static final int STYLE_DIAG_RIGHT
public static final int STYLE_DIAG_CROSS
public static final int STYLE_DOT
public static final int STYLE_DASH
public static final int STYLE_DOT_DASH
public static final int STYLE_DOT_DOT_DASH
public static final int DEFAULT_SHADESCALE
public GFXAttr()
Populates the graphic attribute with the following settings:
Style = solid
Shading scale = full shading
Shade = solid
Foreground colour = black
Background colour = white
public GFXAttr(GFXAttr oSource)
Copies all attribute values.
oSource - Source attribute object to copypublic GFXAttr(int nNewStyle,
int lNewShade,
GFXColour oNewColour,
GFXColour oNewColourBg)
Creates an Attribute object with the settings as specified by the input values.
nNewStyle - Specifies the style of the attributelNewShade - Specifies the shade of the attributeoNewColour - Specifies the foreground colouroNewColourBg - Specifies the background colourpublic GFXColour colour()
jfGfxColour objectpublic void colour(GFXColour oNewColour)
oNewColour - The new foreground colour as a
jfGfxColour objectpublic GFXColour colourBg()
jfGfxColour objectpublic void colourBg(GFXColour oNewColourBg)
oNewColourBg - The new background colour as a
jfGfxColour objectpublic int shade()
public void shade(int lNewShade)
lNewShade - The new shading valuepublic int shadeScale()
public void shadeScale(int lNewScale)
lNewScale - The new upper bound for shading.public GFXColour shadeColour()
jfGfxColour objectpublic static int defaultShadeScale()
public int style()
public void style(int nNewStyle)
nNewStyle - The new style as a StyleCode enumerationpublic GFXGraphicContext graphicContext()
public void graphicContext(GFXGraphicContext poGraphicContext)
poGraphicContext - - New graphic context to associate with this graphic
attribute object.public boolean equivalent(GFXAttr oCompare)
Compares on an attribute value basis. Two attributes are considered equal if their values compare for equality.
oCompare - Attribute object to compare against.public boolean equals(Object object)
Compares on an attribute value basis. Two attributes are considered equal if their values compare for equality.
public void copyFrom(GFXAttr oSource)
The standard assignment copies everything, including enabled and disabled status. Graphic source information is also copied.
oSource - Source attribute object to copy.Copyright © 2010 - 2020 Adobe. All Rights Reserved