|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graphics.Gradient
The Gradient class represents a certain style that can be used
for area filling. It consists of the following attributes:
The type attribute defines the type of the gradient to fill an area with.
The different types of gradients that can be used to fill an area are as
follows:
RIGHTLEFTVERTICALCENTERTOPBOTTOMHORIZONTALCENTERUPUPCENTERDOWNDOWNCENTERLEFTBOTTOMRIGHTBOTTOMLEFTTOPRIGHTTOPCENTERSQUAREDCENTERCIRCLELEFTTOPCIRCLERIGHTTOPCIRCLE
The foreground color attribute defines the first color that is used to render
the gradient. It is represented by an int that defines the
values for the red, green and blue components as illustrated by the following
hexadecimal pattern:
0x00rrggbb
where rr stands for the red component, gg stands for the green component and
bb stands for the blue component of the color.
The background color attribute defines the second color that is used to
render the gradient. It is represented by an int that defines the
values for the red, green and blue components as illustrated by the following
hexadecimal pattern:
0x00rrggbb
where rr stands for the red component, gg stands for the green component and
bb stands for the blue component of the color.
It is not possible to create an instance of this class. In fact this class
provides some predefined gradients mentioned before that can be used. This
predefined gradients can be gained typewise through a call to
getGradient(int, int, int).
| Field Summary | |
static int |
CENTERCIRCLE
constant that tells about a type of gradient supported by the Gradient class |
static int |
CENTERSQUARED
constant that tells about a type of gradient supported by the Gradient class |
static int |
DOWN
constant that tells about a type of gradient supported by the Gradient class |
static int |
DOWNCENTER
constant that tells about a type of gradient supported by the Gradient class |
static Gradient |
GRADIENT_CENTERCIRCLE
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_CENTERSQUARED
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_DOWN
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_DOWNCENTER
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_HORIZONTALCENTER
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_LEFTBOTTOM
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_LEFTTOP
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_LEFTTOPCIRCLE
constant that defines one of the supported gradients |
static int |
GRADIENT_MAX
constant that indicates the maximum number of predefined patterns |
static Gradient |
GRADIENT_RIGHTBOTTOM
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_RIGHTLEFT
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_RIGHTTOP
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_RIGHTTOPCIRCLE
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_TOPBOTTOM
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_UP
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_UPCENTER
constant that defines one of the supported gradients |
static Gradient |
GRADIENT_VERTICALCENTER
constant that defines one of the supported gradients |
static int |
HORIZONTALCENTER
constant that tells about a type of gradient supported by the Gradient class |
static int |
LEFTBOTTOM
constant that tells about a type of gradient supported by the Gradient class |
static int |
LEFTTOP
constant that tells about a type of gradient supported by the Gradient class |
static int |
LEFTTOPCIRCLE
constant that tells about a type of gradient supported by the Gradient class |
static int |
RIGHTBOTTOM
constant that tells about a type of gradient supported by the Gradient class |
static int |
RIGHTLEFT
constant that tells about a type of gradient supported by the Gradient class |
static int |
RIGHTTOP
constant that tells about a type of gradient supported by the Gradient class |
static int |
RIGHTTOPCIRCLE
constant that tells about a type of gradient supported by the Gradient class |
static int |
TOPBOTTOM
constant that tells about a type of gradient supported by the Gradient class |
static int |
UP
constant that tells about a type of gradient supported by the Gradient class |
static int |
UPCENTER
constant that tells about a type of gradient supported by the Gradient class |
static int |
VERTICALCENTER
constant that tells about a type of gradient supported by the Gradient class |
| Method Summary | |
boolean |
equals(java.lang.Object o)
|
int |
getBackground()
Returns the gradients background color value. |
int |
getForeground()
Returns the gradients foreground color value. |
static Gradient |
getGradient(int type,
int colorback,
int colorfore)
Returns an instance of a Gradient object that belongs to the
type given by type. |
int |
getType()
Returns the type of the gradient. |
int |
hashCode()
Sets the gradients foreground color to the value given by rgb.
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int RIGHTLEFT
Gradient class
public static final int VERTICALCENTER
Gradient class
public static final int TOPBOTTOM
Gradient class
public static final int HORIZONTALCENTER
Gradient class
public static final int UP
Gradient class
public static final int UPCENTER
Gradient class
public static final int DOWN
Gradient class
public static final int DOWNCENTER
Gradient class
public static final int LEFTBOTTOM
Gradient class
public static final int RIGHTBOTTOM
Gradient class
public static final int LEFTTOP
Gradient class
public static final int RIGHTTOP
Gradient class
public static final int CENTERSQUARED
Gradient class
public static final int CENTERCIRCLE
Gradient class
public static final int LEFTTOPCIRCLE
Gradient class
public static final int RIGHTTOPCIRCLE
Gradient class
public static final int GRADIENT_MAX
public static final Gradient GRADIENT_RIGHTLEFT
public static final Gradient GRADIENT_VERTICALCENTER
public static final Gradient GRADIENT_TOPBOTTOM
public static final Gradient GRADIENT_HORIZONTALCENTER
public static final Gradient GRADIENT_UP
public static final Gradient GRADIENT_UPCENTER
public static final Gradient GRADIENT_DOWN
public static final Gradient GRADIENT_DOWNCENTER
public static final Gradient GRADIENT_LEFTBOTTOM
public static final Gradient GRADIENT_RIGHTBOTTOM
public static final Gradient GRADIENT_LEFTTOP
public static final Gradient GRADIENT_RIGHTTOP
public static final Gradient GRADIENT_CENTERSQUARED
public static final Gradient GRADIENT_CENTERCIRCLE
public static final Gradient GRADIENT_LEFTTOPCIRCLE
public static final Gradient GRADIENT_RIGHTTOPCIRCLE
| Method Detail |
public int getType()
RIGHTLEFT,
VERTICALCENTER,
TOPBOTTOM,
HORIZONTALCENTER,
UP,
UPCENTER,
DOWN,
DOWNCENTER,
LEFTBOTTOM,
RIGHTBOTTOM,
LEFTTOP,
RIGHTTOP,
CENTERSQUARED,
CENTERCIRCLE,
LEFTTOPCIRCLE,
RIGHTTOPCIRCLEpublic int getBackground()
public int getForeground()
public int hashCode()
rgb.
This method is only visible within the graphics package.
public boolean equals(java.lang.Object o)
public static Gradient getGradient(int type,
int colorback,
int colorfore)
Gradient object that belongs to the
type given by type.
type - the type of the Gradient to return
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||