|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV NEXT | ||||||||
Uses of Class
java.awt.Color
| Uses of Color in java.awt |
| Subclasses of Color in java.awt | |
class |
SystemColor
This class contains the various "system colors" in use by the native windowing system. |
| Fields in java.awt declared as Color | |
(package private) Color |
Component.foreground
The foreground color for the component. |
(package private) Color |
Component.background
The background color for the component. |
static Color |
Color.white
Constant for the color white: R=255, G=255, B=255. |
static Color |
Color.WHITE
Constant for the color white: R=255, G=255, B=255. |
static Color |
Color.lightGray
Constant for the color light gray: R=192, G=192, B=192. |
static Color |
Color.LIGHT_GRAY
Constant for the color light gray: R=192, G=192, B=192. |
static Color |
Color.gray
Constant for the color gray: R=128, G=128, B=128. |
static Color |
Color.GRAY
Constant for the color gray: R=128, G=128, B=128. |
static Color |
Color.darkGray
Constant for the color dark gray: R=64, G=64, B=64. |
static Color |
Color.DARK_GRAY
Constant for the color dark gray: R=64, G=64, B=64. |
static Color |
Color.black
Constant for the color black: R=0, G=0, B=0. |
static Color |
Color.BLACK
Constant for the color black: R=0, G=0, B=0. |
static Color |
Color.red
Constant for the color red: R=255, G=0, B=0. |
static Color |
Color.RED
Constant for the color red: R=255, G=0, B=0. |
static Color |
Color.pink
Constant for the color pink: R=255, G=175, B=175. |
static Color |
Color.PINK
Constant for the color pink: R=255, G=175, B=175. |
static Color |
Color.orange
Constant for the color orange: R=255, G=200, B=0. |
static Color |
Color.ORANGE
Constant for the color orange: R=255, G=200, B=0. |
static Color |
Color.yellow
Constant for the color yellow: R=255, G=255, B=0. |
static Color |
Color.YELLOW
Constant for the color yellow: R=255, G=255, B=0. |
static Color |
Color.green
Constant for the color green: R=0, G=255, B=0. |
static Color |
Color.GREEN
Constant for the color green: R=0, G=255, B=0. |
static Color |
Color.magenta
Constant for the color magenta: R=255, G=0, B=255. |
static Color |
Color.MAGENTA
Constant for the color magenta: R=255, G=0, B=255. |
static Color |
Color.cyan
Constant for the color cyan: R=0, G=255, B=255. |
static Color |
Color.CYAN
Constant for the color cyan: R=0, G=255, B=255. |
static Color |
Color.blue
Constant for the color blue: R=0, G=0, B=255. |
static Color |
Color.BLUE
Constant for the color blue: R=0, G=0, B=255. |
private Color |
GradientPaint.c1
|
private Color |
GradientPaint.c2
|
| Methods in java.awt that return Color | |
Color |
Component.getForeground()
Returns this component's foreground color. |
Color |
Component.getBackground()
Returns this component's background color. |
Color |
Component.AccessibleAWTComponent.getBackground()
Gets the background color. |
Color |
Component.AccessibleAWTComponent.getForeground()
Gets the foreground color. |
Color |
Color.brighter()
Returns a brighter version of this color. |
Color |
Color.darker()
Returns a darker version of this color. |
static Color |
Color.decode(java.lang.String str)
Converts the specified string to a number, using Integer.decode, and creates a new instance of Color from the value. |
static Color |
Color.getColor(java.lang.String prop)
Returns a new instance of Color from the value of the
system property named by the specified string. |
static Color |
Color.getColor(java.lang.String prop,
Color defcolor)
Returns a new instance of Color from the value of the
system property named by the specified string. |
static Color |
Color.getColor(java.lang.String prop,
int defrgb)
Returns a new instance of Color from the value of the
system property named by the specified string. |
static Color |
Color.getHSBColor(float hue,
float saturation,
float brightness)
Returns a new instance of Color based on the specified
HSB values. |
Color |
MenuComponent.AccessibleAWTMenuComponent.getBackground()
Returns the background color of the component, or null if this property is unsupported. |
Color |
MenuComponent.AccessibleAWTMenuComponent.getForeground()
Returns the foreground color of the component, or null if this property is unsupported. |
abstract Color |
Graphics.getColor()
Returns the current color for this object. |
abstract Color |
Graphics2D.getBackground()
|
Color |
Robot.getPixelColor(int x,
int y)
Return the color of the pixel at the given screen coordinates. |
Color |
GradientPaint.getColor1()
Returns the first color. |
Color |
GradientPaint.getColor2()
Returns the second color. |
| Methods in java.awt with parameters of type Color | |
void |
Component.setForeground(Color c)
Sets this component's foreground color to the specified color. |
void |
Component.setBackground(Color c)
Sets this component's background color to the specified color. |
void |
Component.AccessibleAWTComponent.setBackground(Color c)
Sets the background color. |
void |
Component.AccessibleAWTComponent.setForeground(Color c)
Sets the foreground color. |
static Color |
Color.getColor(java.lang.String prop,
Color defcolor)
Returns a new instance of Color from the value of the
system property named by the specified string. |
void |
MenuComponent.AccessibleAWTMenuComponent.setBackground(Color color)
Sets the background color of the component to that specified. |
void |
MenuComponent.AccessibleAWTMenuComponent.setForeground(Color color)
Sets the foreground color of the component to that specified. |
abstract void |
Graphics.setColor(Color color)
Sets the current color for this object. |
abstract void |
Graphics.setXORMode(Color color)
Sets this context info "XOR" mode, where the targe pixles are XOR-ed when drawn on. |
abstract boolean |
Graphics.drawImage(Image image,
int x,
int y,
Color bgcolor,
java.awt.image.ImageObserver observer)
Draws all of the image that is available and returns. |
abstract boolean |
Graphics.drawImage(Image image,
int x,
int y,
int width,
int height,
Color bgcolor,
java.awt.image.ImageObserver observer)
Draws all of the image that is available and returns. |
abstract boolean |
Graphics.drawImage(Image image,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
Color bgcolor,
java.awt.image.ImageObserver observer)
FIXME: Write Javadocs for this when you understand it. |
abstract void |
Graphics2D.setBackground(Color color)
|
| Constructors in java.awt with parameters of type Color | |
GradientPaint(float x1,
float y1,
Color c1,
float x2,
float y2,
Color c2)
Creates a new acyclic GradientPaint. |
|
GradientPaint(java.awt.geom.Point2D p1,
Color c1,
java.awt.geom.Point2D p2,
Color c2)
Creates a new acyclic GradientPaint. |
|
GradientPaint(float x1,
float y1,
Color c1,
float x2,
float y2,
Color c2,
boolean cyclic)
Creates a new cyclic or acyclic GradientPaint. |
|
GradientPaint(java.awt.geom.Point2D p1,
Color c1,
java.awt.geom.Point2D p2,
Color c2,
boolean cyclic)
Creates a new cyclic or acyclic GradientPaint. |
|
|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV NEXT | ||||||||