Package org.loboevolution.laf
Class ColorFactory
java.lang.Object
org.loboevolution.laf.ColorFactory
A factory for creating Color objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Color
getAdjustedColor
(Color c, double factor) getAdjustedColor.Gets the color.getColor
(LAFColorType colorSpec) Gets the color.getColorString
(HTMLElement element, String colorSpec, String defaultValue) Gets the color string.static ColorFactory
Gets the instance.boolean
Checks if is color.boolean
isRgbOrHsl
(String colorSpec) isRgbOrHsl.
-
Method Details
-
getInstance
Gets the instance.- Returns:
- the instance
-
getColor
Gets the color.- Parameters:
colorSpec
- the color spec- Returns:
- the color
-
getColor
Gets the color.- Parameters:
colorSpec
- the color spec- Returns:
- the color
-
getColorString
Gets the color string.- Parameters:
element
- aHTMLElement
object.colorSpec
- aString
object.defaultValue
- aString
object.- Returns:
- the color
-
isColor
Checks if is color.- Parameters:
colorSpec
- the color spec- Returns:
- true, if is color
-
isRgbOrHsl
isRgbOrHsl.
- Parameters:
colorSpec
- aString
object.- Returns:
- a boolean.
-
getAdjustedColor
getAdjustedColor.
-