Package com.luciad.gui
Class TLcdColor
java.lang.Object
com.luciad.gui.TLcdColor
This class contains utility methods to create colors from strings or from
integers.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Color
interpolate
(Color aColor1, Color aColor2, double aFraction) Interpolates linearly between the two given colors.static Color
makeColor
(int aRGBValue) Returns a Color based on the given RGB integer.static Color
makeTransparentColor
(int aARGBValue) Returns a Color based on the given ARGB integer.static Color
parseColor
(String aColorAsString, Color aDefaultColor) Returns a Color based on the given RGB String.
-
Field Details
-
FG_DEFAULT
-
BG_DEFAULT
-
FG_HEADER
-
BG_HEADER
-
BG_CONTAINER
-
FG_SELECTED
-
BG_SELECTED
-
-
Constructor Details
-
TLcdColor
public TLcdColor()
-
-
Method Details
-
parseColor
Returns a Color based on the given RGB String. The format of the string should be "<red>.<green>.<blue>", where <red>, <green>, and <blue> are values between 0 and 255. For example, the string "255.130.20" corresponds to a color with red=255, green=130 and blue=20. The given default color is returned if the string can't be parsed properly. -
makeColor
Returns a Color based on the given RGB integer. -
makeTransparentColor
Returns a Color based on the given ARGB integer. -
interpolate
Interpolates linearly between the two given colors.- Parameters:
aColor1
- the first coloraColor2
- the second pointaFraction
- the interpolation weight- Returns:
- the interpolated color
-