|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.draw.item.ColorFill
public class ColorFill
Class ColorFill provides an object that fills an area in a DrawingItem with a solid color.
| Field Summary | |
|---|---|
static ColorFill |
BLACK
Color fill object for the color black. |
static ColorFill |
BLUE
Color fill object for the color blue. |
static ColorFill |
CYAN
Color fill object for the color cyan. |
static ColorFill |
DARK_GRAY
Color fill object for the color dark gray. |
static ColorFill |
GRAY
Color fill object for the color gray. |
static ColorFill |
GREEN
Color fill object for the color green. |
static ColorFill |
LIGHT_GRAY
Color fill object for the color light gray. |
static ColorFill |
MAGENTA
Color fill object for the color magenta. |
static ColorFill |
NORMAL_FILL
The normal color fill object (white). |
static ColorFill |
ORANGE
Color fill object for the color orange. |
static ColorFill |
PINK
Color fill object for the color pink. |
static ColorFill |
RED
Color fill object for the color red. |
static ColorFill |
WHITE
Color fill object for the color white. |
static ColorFill |
YELLOW
Color fill object for the color yellow. |
| Fields inherited from interface edu.rit.draw.item.Fill |
|---|
NONE |
| Constructor Summary | |
|---|---|
ColorFill()
Construct a new color fill object with the normal fill color (white). |
|
ColorFill(ColorFill theColorFill)
Construct a new color fill object with the same color as the given color fill object. |
|
| Method Summary | |
|---|---|
Color |
color()
Returns the color of this color fill object. |
ColorFill |
color(Color theColor)
Set this color fill object to the given color. |
ColorFill |
gray(float grayLevel)
Set this color fill object to the given shade of gray. |
ColorFill |
gray(int grayLevel)
Set this color fill object to the given shade of gray. |
void |
readExternal(ObjectInput in)
Read this color fill object from the given object input stream. |
ColorFill |
rgb(float red,
float green,
float blue)
Set this color fill object to the color with the given red, green, and blue components. |
ColorFill |
rgb(int red,
int green,
int blue)
Set this color fill object to the color with the given red, green, and blue components. |
void |
setGraphicsContext(Graphics2D g2d)
Set the given graphics context's paint attribute as specified by this fill object. |
void |
writeExternal(ObjectOutput out)
Write this color fill object to the given object output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ColorFill WHITE
public static final ColorFill LIGHT_GRAY
public static final ColorFill GRAY
public static final ColorFill DARK_GRAY
public static final ColorFill BLACK
public static final ColorFill RED
public static final ColorFill PINK
public static final ColorFill ORANGE
public static final ColorFill YELLOW
public static final ColorFill GREEN
public static final ColorFill MAGENTA
public static final ColorFill CYAN
public static final ColorFill BLUE
public static final ColorFill NORMAL_FILL
| Constructor Detail |
|---|
public ColorFill()
public ColorFill(ColorFill theColorFill)
theColorFill - Color fill object.
NullPointerException - (unchecked exception) Thrown if theColorFill is null.| Method Detail |
|---|
public Color color()
public ColorFill gray(int grayLevel)
grayLevel - Gray level in the range 0 (black) through 255 (white).
public ColorFill gray(float grayLevel)
grayLevel - Gray level in the range 0.0f (black) through 1.0f
(white).
public ColorFill rgb(int red,
int green,
int blue)
red - Red component in the range 0 through 255.green - Green component in the range 0 through 255.blue - Blue component in the range 0 through 255.
public ColorFill rgb(float red,
float green,
float blue)
red - Red component in the range 0.0f through 1.0f.green - Green component in the range 0.0f through 1.0f.blue - Blue component in the range 0.0f through 1.0f.
public ColorFill color(Color theColor)
theColor - Color.
NullPointerException - (unchecked exception) Thrown if theColor is null.public void setGraphicsContext(Graphics2D g2d)
setGraphicsContext in interface Fillg2d - 2-D graphics context.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface Externalizableout - Object output stream.
IOException - Thrown if an I/O error occurred.
public void readExternal(ObjectInput in)
throws IOException
readExternal in interface Externalizablein - Object input stream.
IOException - Thrown if an I/O error occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||