APIdia Launch Partner
Top Fields Constructors Methods
com.sun.javafx.css.parser

public final Class CssColorParser

extends Object
Class Inheritance
Imports
javafx.scene.paint.Color, java.util.Map, .TreeMap

Field Summary

Modifier and TypeField and Description
private static final Map<String, Color>
private static final int
private static final int
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static double
parseComponent(String color, int off, int end, int type)

private static Color
parseHSLColor(String color, int hoff, boolean hasAlpha, double a)

private static Color
parseRGBColor(String color, int roff, boolean hasAlpha, double a)

public static Color

Returns:

the color, or null if colorString is not a valid color representation
tryParseColor
(String colorString)

Parses a color string as specified by Color#web(String).

public static Color

Returns:

the color, or null if colorString is not a valid color representation
tryParseColor
(String colorString, double opacity)

Parses a color string as specified by Color#web(String, double).

private static boolean
validInt(long value)

private static boolean
validInts(long value1, long value2, long value3)

private static boolean
validInts(long value1, long value2, long value3, long value4)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NAMED_COLORSback to summary
private static final Map<String, Color> NAMED_COLORS
PARSE_ALPHAback to summary
private static final int PARSE_ALPHA
PARSE_ANGLEback to summary
private static final int PARSE_ANGLE
PARSE_COMPONENTback to summary
private static final int PARSE_COMPONENT
PARSE_PERCENTback to summary
private static final int PARSE_PERCENT

Constructor Detail

CssColorParserback to summary
private CssColorParser()

Method Detail

parseComponentback to summary
private static double parseComponent(String color, int off, int end, int type)
parseHSLColorback to summary
private static Color parseHSLColor(String color, int hoff, boolean hasAlpha, double a)
parseRGBColorback to summary
private static Color parseRGBColor(String color, int roff, boolean hasAlpha, double a)
tryParseColorback to summary
public static Color tryParseColor(String colorString)

Parses a color string as specified by Color#web(String).

Returns:Color

the color, or null if colorString is not a valid color representation

tryParseColorback to summary
public static Color tryParseColor(String colorString, double opacity)

Parses a color string as specified by Color#web(String, double).

Returns:Color

the color, or null if colorString is not a valid color representation

validIntback to summary
private static boolean validInt(long value)
validIntsback to summary
private static boolean validInts(long value1, long value2, long value3)
validIntsback to summary
private static boolean validInts(long value1, long value2, long value3, long value4)