CssParser (Java SE 10 & JDK 10 ) (original) (raw)
- javafx.css.CssParser
public final class CssParser
extends Object
Since:
9
Property Summary
Properties
Type Property Description static ObservableList<CssParser.ParseError> errors Nested Class Summary
Nested Classes
Modifier and Type Class Description static class CssParser.ParseError Encapsulate information about the source and nature of errors encountered while parsing CSS or applying styles to Nodes. Constructor Summary
Constructors
Constructor Description CssParser() Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type Method Description static ObservableList<CssParser.ParseError> errorsProperty() Stylesheet parse(String stylesheetText) Creates a stylesheet from a CSS document string. Stylesheet parse(String docbase,String stylesheetText) Creates a stylesheet from a CSS document string using docbase as the base URL for resolving references within stylesheet. Stylesheet parse(URL url) Updates the given stylesheet by reading a CSS document from a URL, assuming UTF-8 encoding. Stylesheet parseInlineStyle(Styleable node) Parse an in-line style from a Node. * ### Methods declared in class java.lang.[Object](../../java/lang/Object.html "class in java.lang") `[clone](../../java/lang/Object.html#clone%28%29), [equals](../../java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../java/lang/Object.html#finalize%28%29), [getClass](../../java/lang/Object.html#getClass%28%29), [hashCode](../../java/lang/Object.html#hashCode%28%29), [notify](../../java/lang/Object.html#notify%28%29), [notifyAll](../../java/lang/Object.html#notifyAll%28%29), [toString](../../java/lang/Object.html#toString%28%29), [wait](../../java/lang/Object.html#wait%28%29), [wait](../../java/lang/Object.html#wait%28long%29), [wait](../../java/lang/Object.html#wait%28long,int%29)`
Property Detail
* #### errors public static [ObservableList](../../javafx/collections/ObservableList.html "interface in javafx.collections")<[CssParser.ParseError](../../javafx/css/CssParser.ParseError.html "class in javafx.css")> errorsProperty
Constructor Detail
* #### CssParser public CssParser()
Method Detail
* #### parse public [Stylesheet](../../javafx/css/Stylesheet.html "class in javafx.css") parse([String](../../java/lang/String.html "class in java.lang") stylesheetText) Creates a stylesheet from a CSS document string. Parameters: `stylesheetText` \- the CSS document to parse Returns: the Stylesheet * #### parse public [Stylesheet](../../javafx/css/Stylesheet.html "class in javafx.css") parse([String](../../java/lang/String.html "class in java.lang") docbase, [String](../../java/lang/String.html "class in java.lang") stylesheetText) throws [IOException](../../java/io/IOException.html "class in java.io") 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 references `stylesheetText` \- the CSS document to parse Returns: the Stylesheet Throws: `[IOException](../../java/io/IOException.html "class in java.io")` \- the exception * #### parse public [Stylesheet](../../javafx/css/Stylesheet.html "class in javafx.css") parse([URL](../../java/net/URL.html "class in java.net") url) throws [IOException](../../java/io/IOException.html "class in java.io") 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](../../java/io/IOException.html "class in java.io")` \- the exception * #### parseInlineStyle public [Stylesheet](../../javafx/css/Stylesheet.html "class in javafx.css") parseInlineStyle([Styleable](../../javafx/css/Styleable.html "interface in javafx.css") node) Parse an in-line style from a Node. Parameters: `node` \- the styleable node Returns: the style sheet * #### errorsProperty public static [ObservableList](../../javafx/collections/ObservableList.html "interface in javafx.collections")<[CssParser.ParseError](../../javafx/css/CssParser.ParseError.html "class in javafx.css")> errorsProperty()
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2018, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.