java.lang.Object
javafx.css.CssParser
- Since:
- 9
-
Property Summary
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Encapsulate information about the source and nature of errors encountered while parsing CSS or applying styles to Nodes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObservableList<CssParser.ParseError>
Creates a stylesheet from a CSS document string.Creates a stylesheet from a CSS document string using docbase as the base URL for resolving references within stylesheet.Updates the given stylesheet by reading a CSS document from a URL, assuming UTF-8 encoding.parseInlineStyle
(Styleable node) Parse an in-line style from a Node.
-
Property Details
-
errors
-
-
Constructor Details
-
CssParser
public CssParser()
-
-
Method Details
-
parse
Creates a stylesheet from a CSS document string.- Parameters:
stylesheetText
- the CSS document to parse- Returns:
- the Stylesheet
-
parse
Creates a stylesheet from a CSS document string using docbase as the base URL for resolving references within stylesheet.- Parameters:
docbase
- the doc base for resolving URL referencesstylesheetText
- the CSS document to parse- Returns:
- the Stylesheet
- Throws:
IOException
- the exception
-
parse
Updates the given stylesheet by reading a CSS document from a URL, assuming UTF-8 encoding.- Parameters:
url
- URL of the stylesheet to parse- Returns:
- the stylesheet
- Throws:
IOException
- the exception
-
parseInlineStyle
Parse an in-line style from a Node.- Parameters:
node
- the styleable node- Returns:
- the style sheet
-
errorsProperty
-