|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindfusion.diagramming.Brush
com.mindfusion.diagramming.GradientBrush
public class GradientBrush
Represents a gradient brush which paints the interior of objects starting with one color and gradually changing to another color by interpolating the RGB values of the two colors.
Constructor Summary | |
---|---|
GradientBrush()
Initializes a new instance of the GradientBrush class. |
|
GradientBrush(java.awt.Color color1,
java.awt.Color color2,
int angle)
Initializes a new instance of the GradientBrush class. |
|
GradientBrush(float[] fractions,
java.awt.Color[] colors,
int angle)
Initializes a new instance of the GradientBrush class. |
Method Summary | |
---|---|
void |
applyTo(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D bounds)
|
java.lang.Object |
clone()
Creates a clone of the brush. |
int |
getAngle()
Gets the gradient orientation angle. |
java.awt.Color |
getColor1()
Gets the first gradient color. |
java.awt.Color |
getColor2()
Gets the second gradient color. |
java.awt.Color[] |
getColors()
|
float[] |
getFractions()
|
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable. |
void |
setColor1(java.awt.Color value)
Sets the first gradient color. |
void |
setColor2(java.awt.Color value)
Sets the second gradient color. |
void |
setColors(java.awt.Color[] value)
|
void |
setFractions(float[] value)
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GradientBrush(java.awt.Color color1, java.awt.Color color2, int angle)
GradientBrush
class.
color1
- A Color
object representing
the start color of the gradient.color2
- A Color
object representing
the end color of the gradient.angle
- An integer value specifying the gradient orientation.public GradientBrush(float[] fractions, java.awt.Color[] colors, int angle)
GradientBrush
class.
Instances of the GradientBrush class created using this constructor
are currently not serialized.
fractions
- An array of float numbers specifying the positions
of the colors along the gradient.colors
- An array of Color
objects representing
the colors of the gradient.angle
- An integer value specifying the gradient orientation.public GradientBrush()
GradientBrush
class.
Method Detail |
---|
public void applyTo(java.awt.Graphics2D g, java.awt.geom.Rectangle2D bounds)
applyTo
in class Brush
public java.lang.Object clone()
clone
in class Brush
GradientBrush
instance.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public java.awt.Color getColor1()
Color
object representing the fill color.public void setColor1(java.awt.Color value)
value
- A Color
object representing the fill color.public java.awt.Color getColor2()
Color
object representing the fill color.public void setColor2(java.awt.Color value)
value
- A Color
object representing the fill color.public int getAngle()
public float[] getFractions()
public void setFractions(float[] value)
public java.awt.Color[] getColors()
public void setColors(java.awt.Color[] value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |