|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.genui.UIResource<UI>
javax.rad.genui.UIFactoryResource<IColor>
javax.rad.genui.UIColor
public class UIColor
Platform and technology independent Color.
Field Summary | |
---|---|
static UIColor |
black
The color black. |
static UIColor |
blue
The color blue. |
static UIColor |
controlActiveSelectionBackground
The color for control active selection background color. |
static UIColor |
controlActiveSelectionForeground
The color for control active selection foreground color. |
static UIColor |
controlAlternateBackground
The color for control alternate background color. |
static UIColor |
controlBackground
The color for control background color. |
static UIColor |
controlForeground
The color for control foreground color. |
static UIColor |
controlInactiveSelectionBackground
The color for control inactive selection background color. |
static UIColor |
controlInactiveSelectionForeground
The color for control inactive selection foreground color. |
static UIColor |
controlMandatoryBackground
The constant for control mandatory background color. |
static UIColor |
controlReadOnlyBackground
The constant for control read only background color. |
static UIColor |
cyan
The color cyan. |
static UIColor |
darkGray
The color dark gray. |
static UIColor |
gray
The color gray. |
static UIColor |
green
The color green. |
static UIColor |
invalidEditorBackground
The color for invalid editor background color. |
static UIColor |
lightGray
The color light gray. |
static UIColor |
magenta
The color magenta. |
static UIColor |
orange
The color orange. |
static UIColor |
pink
The color pink. |
static UIColor |
red
The color red. |
static UIColor |
white
The color white. |
static UIColor |
yellow
The color yellow. |
Fields inherited from class javax.rad.genui.UIResource |
---|
uiResource |
Constructor Summary | |
---|---|
protected |
UIColor(IColor pColor)
Creates an UIColor of an IColor for compatibility reasons. |
|
UIColor(int pRGBA)
Creates an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. |
|
UIColor(int pRGBA,
boolean pHasalpha)
Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. |
|
UIColor(int pR,
int pG,
int pB)
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255). |
|
UIColor(int pR,
int pG,
int pB,
int pA)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255). |
Method Summary | |
---|---|
static UIColor |
createColor(String pValue)
Creates a color from a list of int values (3(rgb) or 4(rgba) values), comma separated in a string, or in hex representation (#FF00FF). |
int |
getAlpha()
Returns the alpha component in the range 0-255. |
int |
getBlue()
Returns the blue component in the range 0-255 in the default sRGB space. |
int |
getGreen()
Returns the green component in the range 0-255 in the default sRGB space. |
int |
getRed()
Returns the red component in the range 0-255 in the default sRGB space. |
int |
getRGBA()
Returns the red, green, blue and alpha component as one integer. |
static UIColor |
getSystemColor(String pType)
This encapsulate symbolic colors representing the color of native GUI objects on a system. |
static void |
setSystemColor(String pType,
IColor pSystemColor)
Sets the given IColor as SystemColor. |
Methods inherited from class javax.rad.genui.UIFactoryResource |
---|
getResource, getUIResource |
Methods inherited from class javax.rad.genui.UIResource |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.rad.ui.IResource |
---|
getResource |
Field Detail |
---|
public static final UIColor white
public static final UIColor lightGray
public static final UIColor gray
public static final UIColor darkGray
public static final UIColor black
public static final UIColor red
public static final UIColor pink
public static final UIColor orange
public static final UIColor yellow
public static final UIColor green
public static final UIColor magenta
public static final UIColor cyan
public static final UIColor blue
public static final UIColor controlBackground
public static final UIColor controlAlternateBackground
public static final UIColor controlForeground
public static final UIColor controlActiveSelectionBackground
public static final UIColor controlActiveSelectionForeground
public static final UIColor controlInactiveSelectionBackground
public static final UIColor controlInactiveSelectionForeground
public static final UIColor controlMandatoryBackground
public static final UIColor controlReadOnlyBackground
public static final UIColor invalidEditorBackground
Constructor Detail |
---|
protected UIColor(IColor pColor)
pColor
- the IColor.public UIColor(int pRGBA)
pRGBA
- the combined RGB componentsIColor
,
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
,
IColor.getRGBA()
public UIColor(int pRGBA, boolean pHasalpha)
pHasalpha
argument is false
, alpha
is defaulted to 255.
pRGBA
- the combined RGBA componentspHasalpha
- true
if the alpha bits are valid;
false
otherwiseIColor
,
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
,
IColor.getAlpha()
,
IColor.getRGBA()
public UIColor(int pR, int pG, int pB)
pR
- the red componentpG
- the green componentpB
- the blue componentIColor
,
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
,
IColor.getRGBA()
public UIColor(int pR, int pG, int pB, int pA)
pR
- the red componentpG
- the green componentpB
- the blue componentpA
- the alpha componentIColor
,
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
,
IColor.getAlpha()
,
IColor.getRGBA()
Method Detail |
---|
public int getRed()
getRed
in interface IColor
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
public int getGreen()
getGreen
in interface IColor
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
public int getBlue()
getBlue
in interface IColor
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
public int getAlpha()
getAlpha
in interface IColor
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
public int getRGBA()
getRGBA
in interface IColor
IColor.getRed()
,
IColor.getGreen()
,
IColor.getBlue()
public static UIColor getSystemColor(String pType)
SystemColor
object with a non-symbolic Color object,
getRGB
should be used rather than equals
.
Note that the way in which these system colors are applied to GUI objects may vary slightly from platform to platform since GUI objects may be rendered differently on each platform.
pType
- the type
IColor
IColor
public static void setSystemColor(String pType, IColor pSystemColor)
IColor
as SystemColor.
If pSystemColor
is null
the
original SystemColor
is restored.
pType
- the typepSystemColor
- the IColor
IColor
public static UIColor createColor(String pValue)
pValue
- the value string
null
if the color values are invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |