APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.plaf

public Class ColorUIResource

extends Color
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Known Direct Subclasses
sun.swing.PrintColorUIResource
Annotations
@SuppressWarnings:serial
Imports
java.awt.Color, java.beans.ConstructorProperties

A subclass of Color that implements UIResource. UI classes that create colors should use this class.

Warning

Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Author
Hans Muller
See Also
javax.swing.plaf.UIResource

Field Summary

Inherited from java.awt.Color:
blackBLACKblueBLUEcyanCYANDARK_GRAYdarkGraygrayGRAYgreenGREENLIGHT_GRAYlightGraymagentaMAGENTAorangeORANGEpinkPINKredREDwhiteWHITEyellowYELLOW

Constructor Summary

AccessConstructor and Description
public
ColorUIResource(int
the red component
r
,
int
the green component
g
,
int
the blue component
b
)

Constructs a ColorUIResource.

public
ColorUIResource(int
the combined RGB components
rgb
)

Constructs a ColorUIResource.

public
ColorUIResource(float
the red component
r
,
float
the green component
g
,
float
the blue component
b
)

Constructs a ColorUIResource.

public
ColorUIResource(Color
the color
c
)

Constructs a ColorUIResource.

Method Summary

Inherited from java.awt.Color:
brightercreateContextdarkerdecodeequalsgetAlphagetBluegetColorgetColorgetColorgetColorComponentsgetColorComponentsgetColorSpacegetComponentsgetComponentsgetGreengetHSBColorgetRedgetRGBgetRGBColorComponentsgetRGBComponentsgetTransparencyhashCodeHSBtoRGBRGBtoHSBtoString

Constructor Detail

ColorUIResourceback to summary
public ColorUIResource(int r, int g, int b)

Constructs a ColorUIResource.

Parameters
r:int

the red component

g:int

the green component

b:int

the blue component

Annotations
@ConstructorProperties:red, green, blue
ColorUIResourceback to summary
public ColorUIResource(int rgb)

Constructs a ColorUIResource.

Parameters
rgb:int

the combined RGB components

ColorUIResourceback to summary
public ColorUIResource(float r, float g, float b)

Constructs a ColorUIResource.

Parameters
r:float

the red component

g:float

the green component

b:float

the blue component

ColorUIResourceback to summary
public ColorUIResource(Color c)

Constructs a ColorUIResource.

Parameters
c:Color

the color