Spec-Zone.ru › OpenJavaFX 11
Module javafx.graphics
Package javafx.css

Class CssParser

  • java.lang.Object
    • 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 MethodsStatic MethodsInstance MethodsConcrete 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 inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Property Detail

    • errors

      public static ObservableList<CssParser.ParseError> errorsProperty
  • Constructor Detail

    • CssParser

      public CssParser()
  • Method Detail

    • parse

      public Stylesheet parse​(String stylesheetText)
      Creates a stylesheet from a CSS document string.
      Parameters:
      stylesheetText - the CSS document to parse
      Returns:
      the Stylesheet
    • parse

      public Stylesheet parse​(String docbase,
                              String stylesheetText)
                       throws IOException
      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 - the exception
    • parse

      public Stylesheet parse​(URL url)
                       throws IOException
      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

      public Stylesheet parseInlineStyle​(Styleable node)
      Parse an in-line style from a Node.
      Parameters:
      node - the styleable node
      Returns:
      the style sheet
    • errorsProperty

      public static ObservableList<CssParser.ParseError> errorsProperty()

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API