|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.RenderAttributes
All of the attributes are considered immutable, including Shape and Stroke objects, which are mere interfaces. This particularly affects render attribute dupping, which uses the render attributes' shallow copy constructor.
Plane alignment keywords:
Diagonal alignment keywords:
In/out placement keywords:
getAlignment(int) and setAlignment(int,int) to
access alignment values, and toAlignment(String) and toAlignment(int) to convert them to and from strings. To use the values
of these three groups together, do bitwise-OR for alignment values or
concatenate strings with separating hyphen ('-').
Use getColor(int) and setColor(int,Paint) to
access color values.
Use getComposite(int) and setComposite(int,Composite) to
access composite values.
Use getFont(int) and setFont(int,Font) to
access font values.
Use getPaint(int) and setPaint(int,Paint) to
access paint values.
Use getShape(int) and setShape(int,Shape) to
access shape values.
Use getStroke(int) and setStroke(int,Stroke) to
access stroke values.
null (or
UNSET). However, this does not guarantee a non-null
value, because the default attribute may also be null.
Like other attributes, the set of default attributes, as a whole, is immutable from the master render attribute object point of view. There is particularly no way to access the default attribute object once it is set. Even so, a direct reference to the defaults object enables for the default values to change by external means.
With the default attribute mechanism, more than two render
attributes may be arranged into a chain (or even a loop) of
attributes that default to each other. However, if all members in a
loop have null values, the program will remain in an
infinite loop.
defaultIndex promotes one of the render attributes
indexes above others, to be used as a default index value in
variety of applicable situations.
| Field Summary | |
protected static com.davisor.core.Index |
ANTIALIASINDEX
|
static java.lang.String[] |
ANTIALIASWORDS
Antialias mode keywords. |
static int |
AUTO
Antialiasing control value (enabled or disabled automatically). |
static int |
BACK
Back alignment key. |
static int |
CEILING
Ceiling alignment key (UP and HORIZONTAL). |
static int |
CENTER
Center alignment key (LEFT and RIGHT and UP and DOWN). |
static int |
DIAGONAL
Diagonal alignment key (FRONT and BACK). |
static int |
DOWN
Down alignment key (8). |
static int |
FLOOR
Floor alignment key (DOWN and HORIZONTAL). |
static int |
FRONT
Front alignment key. |
static int |
GRAPHICS
Antialiasing control value (at least graphics enabled). |
static int |
HORIZONTAL
Horizontal alignment key (LEFT and RIGHT). |
static int |
INSIDE
Inside alignment key. |
static int |
LEFT
Left alignment key (1). |
static int |
LEFTWALL
Vertical left alignment key (LEFT and VERTICAL). |
static java.awt.geom.Line2D |
LINE
Vertical unit line. |
protected int[] |
M_alignment
Alignment array (never null, but values may be UNSET). |
protected java.awt.Paint[] |
M_color
Color attribute (may be null). |
protected java.awt.Composite[] |
M_composite
Composite attribute (may be null). |
protected int |
M_defaultIndex
Default index for searching a value (0). |
protected RenderAttributes |
M_defaults
Default attributes (may be null). |
protected java.awt.Font[] |
M_font
Font attribute (may be null). |
protected java.awt.Paint[] |
M_paint
Paint attribute (may be null). |
protected java.awt.Shape[] |
M_shape
Shape attribute (may be null). |
protected int |
M_size
Array length for attributes. |
protected java.awt.Stroke[] |
M_stroke
Stroke attribute (may be null). |
static int |
NE
North-east alignment key (UP and RIGHT). |
static int |
NONE
Void default index value. |
static int |
NW
North-west alignment key (UP and LEFT). |
static int |
OFF
Antialiasing control value (disabled). |
static int |
ON
Antialiasing control value (enabled). |
static int |
OUTSIDE
Outside alignment key. |
static int |
RIGHT
Right alignment key (2). |
static int |
RIGHTWALL
Vertical right alignment key (RIGHT and VERTICAL). |
static int |
SE
South-east alignment key (DOWN and RIGHT). |
static int |
SW
South-west alignment key (DOWN and LEFT). |
static int |
TEXT
Antialiasing control value (at least text enabled). |
static int |
THROUGH
Through alignment key (INSIDE and OUTSIDE). |
static int |
UNSET
Unset code key (0). |
static int |
UP
Up alignment key (4). |
static int |
VERTICAL
Vertical alignment key (UP and DOWN). |
| Constructor Summary | |
RenderAttributes(int size)
Creates a render attribute set with the given number of elements. |
|
RenderAttributes(int size,
RenderAttributes defaults)
Creates a render attribute set with the given defaults and number of elements. |
|
RenderAttributes(int size,
RenderAttributes defaults,
int defaultIndex)
Creates a render attribute set with the given control attributes and number of elements. |
|
RenderAttributes(int size,
RenderAttributes defaults,
int defaultIndex,
java.awt.Paint[] colors,
java.awt.Paint[] paints,
java.awt.Stroke[] strokes,
java.awt.Shape[] shapes,
java.awt.Font[] fonts,
int[] alignments,
java.awt.Composite[] composites)
Creates a render attributes set with the given initial attribute values. |
|
RenderAttributes(int size,
RenderAttributes defaults,
int defaultIndex,
java.awt.Paint color,
java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.Shape shape,
java.awt.Font font,
int alignment,
java.awt.Composite composite)
Creates a render attributes set with the given initial default attribute values. |
|
RenderAttributes(RenderAttributes ra)
Shallow copy constructor. |
|
RenderAttributes(RenderAttributes ra,
RenderAttributes defaults)
Shallow copy constructor, with explicitly given default values. |
|
| Method Summary | |
com.davisor.core.Dupable |
dup()
Duplicates this object. |
boolean |
equals(java.lang.Object object)
Test if these render attributes equal to given render attributes. |
static int |
exchangeOrientation(int alignment)
Exchange horizontal and vertical alignment components. |
int[] |
getAlignment()
Gets all alignment attributes. |
int |
getAlignment(int index)
Gets the alignment attribute. |
int |
getAlignment(int index,
boolean useLocalDefault)
Like getAlignment(int) but allows defining whether to
use local default defined by default index or not. |
java.awt.Paint[] |
getColor()
Gets all color attributes. |
java.awt.Paint |
getColor(int index)
Gets the color attribute of the given index. |
java.awt.Paint |
getColor(int index,
boolean useLocalDefault)
Gets the color attribute if the given index. |
java.awt.Composite[] |
getComposite()
Gets all composite attributes. |
java.awt.Composite |
getComposite(int index)
Gets the composite attribute of the given index. |
java.awt.Composite |
getComposite(int index,
boolean useLocalDefault)
Like getComposite(int) but allows defining whether to use
local default defined by default index or not. |
int |
getDefaultAlignment()
Gets default alignment attribute. |
java.awt.Paint |
getDefaultColor()
Gets default color attribute. |
java.awt.Composite |
getDefaultComposite()
Gets the default composite attribute. |
java.awt.Composite |
getDefaultComposite(int index)
Gets the composite attribute of the given index with a non-null default value. |
java.awt.Font |
getDefaultFont()
Gets default font attribute. |
java.awt.Paint |
getDefaultPaint()
Gets default paint attribute. |
int |
getDefaults()
Gets the number of recursive default value objects. |
java.awt.Shape |
getDefaultShape()
Gets default shape attribute. |
java.awt.Stroke |
getDefaultStroke()
Gets default stroke attribute. |
float |
getDefaultStrokeWidth()
Gets default stroke line width. |
static int |
getDiagonal(int alignment)
Gets the diagonal component in given alignment. |
java.awt.Font[] |
getFont()
Gets all font attributes. |
java.awt.Font |
getFont(int index)
Gets the font attribute of the given index. |
java.awt.Font |
getFont(int index,
boolean useLocalDefault)
Like getFont(int) but allows defining whether to use
local default defined by default index or not. |
static int |
getHorizontal(int alignment)
Gets the horizontal component in given alignment. |
java.awt.Paint[] |
getPaint()
Gets all paint attributes. |
java.awt.Paint |
getPaint(int index)
Gets the paint attribute of the given index. |
java.awt.Paint |
getPaint(int index,
boolean useLocalDefault)
Like getPaint(int) but allows defining whether to use
local default defined by default index or not. |
java.awt.Shape[] |
getShape()
Gets all shape attributes. |
java.awt.Shape |
getShape(int index)
Gets the shape attribute of the given index. |
java.awt.Shape |
getShape(int index,
boolean useLocalDefault)
Like getShape(int) but allows defining whether to use
local default defined by default index or not. |
java.awt.Stroke[] |
getStroke()
Gets all stroke attributes. |
java.awt.Stroke |
getStroke(int index)
Gets the stroke attribute of the given index. |
java.awt.Stroke |
getStroke(int index,
boolean useLocalDefault)
Like getStroke(int) but allows defining whether to use
local default defined by default index or not. |
float |
getStrokeWidth(int index)
Gets stroke line width of the given index. |
static float |
getStrokeWidth(java.awt.Stroke stroke)
Measures the line width of the given stroke. |
static int |
getVertical(int alignment)
Gets the vertical component in given alignment. |
protected void |
init(int size)
Initializes attribute value tables. |
static boolean |
isDown(int alignment)
Tests if given alignment contains DOWN component. |
static boolean |
isHorizontal(int alignment)
Tests if given alignment is horizontally aligned. |
static boolean |
isLeft(int alignment)
Tests if given alignment contains LEFT component. |
static boolean |
isRight(int alignment)
Tests if given alignment contains RIGHT component. |
static boolean |
isUp(int alignment)
Tests if given alignment contains UP component. |
static boolean |
isVertical(int alignment)
Tests if given alignment is vertically aligned. |
void |
next()
Rotates all color and paint palettes. |
void |
setAlignment(int alignment)
Sets the default alignment attribute. |
void |
setAlignment(int[] alignment)
Sets the alignment attribute for all elements. |
void |
setAlignment(int index,
int alignment)
Sets the alignment attribute. |
void |
setAlignment(int index,
java.lang.String alignment)
Sets the alignment attribute by keyword. |
void |
setAlignment(java.lang.String alignment)
Sets the default alignment attribute by keyword. |
void |
setColor(int index,
java.awt.Paint color)
Sets the color attribute of the given index. |
void |
setColor(java.awt.Paint color)
Sets the default color attribute. |
void |
setColor(java.awt.Paint[] color)
Sets the color attribute for all elements. |
void |
setComposite(java.awt.Composite composite)
Sets the default composite attribute. |
void |
setComposite(java.awt.Composite[] composite)
Sets the composite attribute for all elements. |
void |
setComposite(int index,
java.awt.Composite composite)
Sets the composite attribute of the given index. |
void |
setDefaults(RenderAttributes defaults)
Sets default attributes. |
void |
setFont(java.awt.Font font)
Sets the default font attribute. |
void |
setFont(java.awt.Font[] font)
Sets the font attribute for all elements. |
void |
setFont(int index,
java.awt.Font font)
Sets the font attribute of the given index. |
void |
setPaint(int index,
java.awt.Paint paint)
Sets the paint attribute of the given index. |
void |
setPaint(java.awt.Paint paint)
Sets the default paint attribute. |
void |
setPaint(java.awt.Paint[] paint)
Sets the paint attribute for all elements. |
void |
setShape(int index,
java.awt.Shape shape)
Sets the shape attribute of the given index. |
void |
setShape(java.awt.Shape shape)
Sets the default shape attribute. |
void |
setShape(java.awt.Shape[] shape)
Sets the shape attribute for all elements. |
void |
setStroke(int index,
java.awt.Stroke stroke)
Sets the stroke attribute of the given index. |
void |
setStroke(java.awt.Stroke stroke)
Sets the default stroke attribute. |
void |
setStroke(java.awt.Stroke[] stroke)
Sets the stroke attribute for all elements. |
int |
size()
Gets the number of render attributes. |
static java.lang.String |
toAlignment(int alignment)
Maps an alignment keycode to an alignment keyword. |
static int |
toAlignment(java.lang.String alignment)
Maps an alignment keyword to an alignment keycode. |
static java.lang.String |
toAntialiasMode(int antialiasMode)
Maps an antialias mode keycode to an antialias mode keyword. |
static int |
toAntialiasMode(java.lang.String antialiasMode)
Maps an antialias mode keyword to an antialias mode keycode. |
java.lang.String |
toString()
Gets a string representation of the content of this object. |
java.lang.String |
toString(int index,
java.lang.String prefix)
Generates a set of attribute XML representations. |
protected void |
toString(java.lang.StringBuffer xml)
Generate XML attributes names. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int NONE
public static final int UNSET
public static final java.awt.geom.Line2D LINE
public static final int LEFT
public static final int RIGHT
public static final int HORIZONTAL
public static final int UP
public static final int NW
public static final int NE
public static final int CEILING
public static final int DOWN
public static final int SW
public static final int SE
public static final int FLOOR
public static final int VERTICAL
public static final int LEFTWALL
public static final int RIGHTWALL
public static final int CENTER
public static final int FRONT
public static final int BACK
public static final int DIAGONAL
public static final int INSIDE
public static final int OUTSIDE
public static final int THROUGH
public static final int ON
public static final int OFF
public static final int AUTO
public static final int TEXT
public static final int GRAPHICS
public static final java.lang.String[] ANTIALIASWORDS
protected static final com.davisor.core.Index ANTIALIASINDEX
protected int[] M_alignment
null, but values may be UNSET).
protected java.awt.Paint[] M_color
protected java.awt.Composite[] M_composite
protected java.awt.Font[] M_font
protected java.awt.Paint[] M_paint
protected java.awt.Shape[] M_shape
protected java.awt.Stroke[] M_stroke
protected transient int M_defaultIndex
protected transient RenderAttributes M_defaults
protected transient int M_size
| Constructor Detail |
public RenderAttributes(RenderAttributes ra)
ra - render attributes to be copied (may be null)RenderAttributes(RenderAttributes,RenderAttributes)
public RenderAttributes(RenderAttributes ra,
RenderAttributes defaults)
If given defaults are null, given
principal render attributes defaults are used, if available. If
not, default attributes remains unset. In any case, they may be
later set with setDefaults(com.davisor.graphics.RenderAttributes).
If given principal render attributes source ra is
null, render attributes set size is copied from
given defaults, if possible. If both arguments are
null, render attribute set size and defaults
remain undetermined.
ra - render attributes to be copied (may be null)defaults - default render attibutes (may be null)RenderAttributes(RenderAttributes),
init(int),
setDefaults(com.davisor.graphics.RenderAttributes)public RenderAttributes(int size)
null (or UNSET). The default index will
be NONE, and the exceptions will initially be allowed.
size - number of render attributesRenderAttributes(int,RenderAttributes)
public RenderAttributes(int size,
RenderAttributes defaults)
null (or UNSET). The default index will
be NONE, and the exceptions will initially be allowed.
size - number of render attributesdefaults - default attribute values (may be null)RenderAttributes(int,RenderAttributes,int)
public RenderAttributes(int size,
RenderAttributes defaults,
int defaultIndex)
null (or UNSET).
size - number of render attributesdefaults - default attribute values (may be null)defaultIndex - index for the default render attribute
public RenderAttributes(int size,
RenderAttributes defaults,
int defaultIndex,
java.awt.Paint color,
java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.Shape shape,
java.awt.Font font,
int alignment,
java.awt.Composite composite)
size - number of render attributes (must be > 0)defaults - default attribute values (may be null)defaultIndex - index for default render attributecolor - initial color attribute values (may be null)paint - initial paint attribute values (may be null)stroke - initial stroke attribute values (may be null)shape - initial shape attribute values (may be null)font - initial font attribute values (may be null)alignment - initial alignment attribute values (may be null)composite - initial composite attribute values (may be null)RenderAttributes(int,RenderAttributes,int)
public RenderAttributes(int size,
RenderAttributes defaults,
int defaultIndex,
java.awt.Paint[] colors,
java.awt.Paint[] paints,
java.awt.Stroke[] strokes,
java.awt.Shape[] shapes,
java.awt.Font[] fonts,
int[] alignments,
java.awt.Composite[] composites)
null (or UNSET).
size - number of render attributesdefaults - default attribute values (may be null)defaultIndex - index for default render attributecolors - initial color attribute values (may be null)paints - initial paint attribute values (may be null)strokes - initial stroke attribute values (may be null)shapes - initial shape attribute values (may be null)fonts - initial font attribute values (may be null)alignments - initial alignment attribute values (may be null)composites - initial composite attribute values (may be null)RenderAttributes(int,RenderAttributes,int)| Method Detail |
public com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupablepublic boolean equals(java.lang.Object object)
public java.lang.String toString()
This implementation uses toString(StringBuffer) to
generate XML attributes with appropriate attribute names. In
particular, subclasses are encouraged to override that method
with more spesific implementations that give explicit meaning and
names for the different attribute sets.
toString(StringBuffer),
toString(int,String)protected void init(int size)
size - attribute value tables sizeprotected void toString(java.lang.StringBuffer xml)
toString(int,String) with appropriate
arguments.
Subclasses are encouraged to override this method with more spesific implementations that give explicit meaning and names for the different attribute sets.
xml - string buffer to write xml attributes intotoString(),
toString(int,String)public static int exchangeOrientation(int alignment)
LEFT becomes UP
RIGHT becomes DOWN
UP becomes LEFT
DOWN becomes RIGHT
getHorizontal(int),
getVertical(int)public int[] getAlignment()
null, but values may be UNSET)getAlignment(int),
getDefaultAlignment()public int getAlignment(int index)
UNSET and the default attributes have been set, then the
corresponding default value is returned instead. The default
value may also be UNSET.
If the requested index falls outside of the current range, an
exception is thrown, if allowed. Otherwise, the value associated
with the default index is returned. This might be
UNSET, too.
index - alignment index
java.lang.ArrayIndexOutOfBoundsException - if index is invalidgetAlignment(),
getDefaultAlignment()
public int getAlignment(int index,
boolean useLocalDefault)
getAlignment(int) but allows defining whether to
use local default defined by default index or not.
public java.awt.Paint[] getColor()
getColor(int),
getDefaultColor()public java.awt.Paint getColor(int index)
null and the default attributes have been
set, then the corresponding default value is returned
instead. The default value may also be null.
If the requested index falls outside of the current range, an
exception is thrown, if allowed. Otherwise, the value associated
with the default index is returned. This might be
null, too.
getColor(),
getDefaultColor()
public java.awt.Paint getColor(int index,
boolean useLocalDefault)
getColor(int)public java.awt.Composite[] getComposite()
getComposite(int),
getDefaultComposite(),
getDefaultComposite(int)public java.awt.Composite getComposite(int index)
null and the default attributes have been
set, then the corresponding default value is returned
instead. The default value may also be null.
If the requested index falls outside of the current range, an
exception is thrown, if allowed. Otherwise, the value associated
with the default index is returned. This might be
null, too.
getComposite(),
getDefaultComposite(),
getDefaultComposite(int)
public java.awt.Composite getComposite(int index,
boolean useLocalDefault)
getComposite(int) but allows defining whether to use
local default defined by default index or not.
public int getDefaultAlignment()
getAlignment(),
getAlignment(int)public java.awt.Paint getDefaultColor()
getColor(),
getColor(int)public java.awt.Composite getDefaultComposite()
getComposite(),
getComposite(int),
getDefaultComposite(int)public java.awt.Composite getDefaultComposite(int index)
getComposite(),
getComposite(int),
getDefaultComposite()public java.awt.Font getDefaultFont()
getFont(),
getFont(int)public java.awt.Paint getDefaultPaint()
getPaint(),
getPaint(int)public java.awt.Shape getDefaultShape()
getShape(),
getShape(int)public java.awt.Stroke getDefaultStroke()
getStroke(),
getStroke(int)public float getDefaultStrokeWidth()
getStrokeWidth(int),
getStrokeWidth(Stroke)public int getDefaults()
public java.awt.Font[] getFont()
getFont(int),
getDefaultFont()public java.awt.Font getFont(int index)
null and the default attributes have been
set, then the corresponding default value is returned
instead. The default value may also be null.
If the requested index falls outside of the current range, an
exception is thrown, if allowed. Otherwise, the value associated
with the default index is returned. This might be
null, too.
getFont(),
getDefaultFont()
public java.awt.Font getFont(int index,
boolean useLocalDefault)
getFont(int) but allows defining whether to use
local default defined by default index or not.
public static int getHorizontal(int alignment)
UNSET, LEFT, RIGHT, or
HORIZONTALgetVertical(int),
isDown(int),
isLeft(int),
isRight(int),
isUp(int)public java.awt.Paint[] getPaint()
getDefaultPaint(),
getPaint(int)public java.awt.Paint getPaint(int index)
null and the default attributes have been
set, then the corresponding default value is returned
instead. The default value may also be null.
If the requested index falls outside of the current range, an
exception is thrown, if allowed. Otherwise, the value associated
with the default index is returned. This might be
null, too.
getDefaultPaint(),
getPaint()
public java.awt.Paint getPaint(int index,
boolean useLocalDefault)
getPaint(int) but allows defining whether to use
local default defined by default index or not.
public java.awt.Shape[] getShape()
getDefaultShape(),
getShape(int)public java.awt.Shape getShape(int index)
null and the default attributes have been
set, then the corresponding default value is returned
instead. The default value may also be null.
If the requested index falls outside of the current range, an
exception is thrown, if allowed. Otherwise, the value associated
with the default index is returned. This might be
null, too.
getDefaultShape(),
getShape()
public java.awt.Shape getShape(int index,
boolean useLocalDefault)
getShape(int) but allows defining whether to use
local default defined by default index or not.
public java.awt.Stroke[] getStroke()
getDefaultStroke(),
getStroke(int)public java.awt.Stroke getStroke(int index)
null and the default attributes have been
set, then the corresponding default value is returned
instead. The default value may also be null.
If the requested index falls outside of the current range, an
exception is thrown, if allowed. Otherwise, the value associated
with the default index is returned. This might be
null, too.
getDefaultStroke(),
getStroke()
public java.awt.Stroke getStroke(int index,
boolean useLocalDefault)
getStroke(int) but allows defining whether to use
local default defined by default index or not.
public static float getStrokeWidth(java.awt.Stroke stroke)
null, zero is returned. If the stroke is an
instance of BasicStroke, the line width of it is
returned. Otherwise, the stroke width is measured by drawing a
vertical unit line with the given stroke, and measuring the width
of the resulting shape.
stroke - the stroke to be measured (may be null)
getDefaultStrokeWidth(),
getStrokeWidth(int)public float getStrokeWidth(int index)
getDefaultStrokeWidth(),
getStrokeWidth(Stroke)public static int getVertical(int alignment)
UNSET, UP, DOWN, or
VERTICALgetHorizontal(int),
isDown(int),
isLeft(int),
isRight(int),
isUp(int)public static int getDiagonal(int alignment)
UNSET, FRONT, BACK, or
DIAGONALgetHorizontal(int),
getVertical(int)public static boolean isDown(int alignment)
DOWN component.
isLeft(int),
isRight(int),
isUp(int)public static boolean isHorizontal(int alignment)
HORIZONTAL component,
or if it contains either LEFT or RIGHT
component, but no UP or DOWN
components.
isVertical(int)public static boolean isLeft(int alignment)
LEFT component.
isDown(int),
isRight(int),
isUp(int)public static boolean isRight(int alignment)
RIGHT component.
isDown(int),
isLeft(int),
isUp(int)public static boolean isUp(int alignment)
UP component.
isDown(int),
isLeft(int),
isRight(int)public static boolean isVertical(int alignment)
VERTICAL component,
or if it contains either UP or DOWN
component, but no LEFT or RIGHT
components.
isHorizontal(int)public void next()
BetterPaint
instance is replaced with whatever paints their BetterPaint.next() method returns.
While iterating through colors and paints, this method is very
carefull of not to mix explicitly defined colors and paints with
their corresponding local default values. In particular, when
this method operates on particular color or paint, it fetches the
color or paint with getColor(int,boolean) and getPaint(int,boolean) methods with the corresponding
useLocalDefaults argument set to false.
This method modifies the current object, but it never changes the state of any default render attributes linked to this object. In particular, if this attribute set does not contains a certain color or paint, but it's default attributes set does, the source color or paint is taken from the default set, but the new color or paint is stored into this set. The original default color or paint object in a default attribute set is therefore not replaced, only shadowed by a new color or paint instance.
getColor(int,boolean),
getPaint(int,boolean),
setColor(int,Paint),
setPaint(int,Paint),
BetterPaint.next()public void setAlignment(int alignment)
alignment - alignment codesetAlignment(String),
setAlignment(int,String),
setAlignment(int,int)public void setAlignment(java.lang.String alignment)
UNSET.
alignment - alignment keywordsetAlignment(int),
setAlignment(int,String),
setAlignment(int,int)public void setAlignment(int[] alignment)
If given array is null or too short, all alignment
values corresponding to the missing values become
UNSET. If given array is too long, the extra
alignment values are ignored.
alignment - array of alignment codes (may be null)setAlignment(int),
setAlignment(String),
setAlignment(int,String),
setAlignment(int,int)
public void setAlignment(int index,
int alignment)
index - alignment indexalignment - alignment code
java.lang.ArrayIndexOutOfBoundsException - if index is invalidsetAlignment(String),
setAlignment(int),
setAlignment(int,String)
public void setAlignment(int index,
java.lang.String alignment)
UNSET.
index - alignment indexalignment - alignment keyword
java.lang.ArrayIndexOutOfBoundsException - if index is invalidsetAlignment(String),
setAlignment(int),
setAlignment(int,int),
toAlignment(String)public void setColor(java.awt.Paint color)
setColor(int,Paint)public void setColor(java.awt.Paint[] color)
If given array is null or too short, all color
values corresponding to the missing values become
null. If given array is too long, the extra
color values are ignored.
color - array of color codes (may be null)setColor(Paint),
setColor(int,Paint)
public void setColor(int index,
java.awt.Paint color)
setColor(Paint)public void setComposite(java.awt.Composite composite)
setComposite(int,Composite)public void setComposite(java.awt.Composite[] composite)
If given array is null or too short, all composite
values corresponding to the missing values become
null. If given array is too long, the extra
composite values are ignored.
composite - array of composite codes (may be null)setComposite(Composite),
setComposite(int,Composite)
public void setComposite(int index,
java.awt.Composite composite)
setComposite(Composite)