Class Stylesheet
java.lang.Object
javafx.css.Stylesheet
A stylesheet which can apply properties to a tree of objects.  A stylesheet
 is a collection of zero or more 
Rules, each of which is applied
 to each object in the tree.  Typically the selector will examine the object to
 determine whether or not it is applicable, and if so it will apply certain
 property values to the object.- Since:
- 9
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidconvertToBinary(File source, File destination) Converts the css file referenced bysourceto binary format and writes it todestination.booleanIndicates whether thisStylesheetis "equal to" some other object.Returns the font faces used by thisStylesheet.Returns the origin of thisStylesheet.getRules()Returns the rules that are defined in thisStylesheet.getUrl()The URL from which thisStylesheetwas loaded.static StylesheetloadBinary(InputStream stream) Loads a binary stylesheet from a stream.static StylesheetloadBinary(URL url) Loads a binary stylesheet from aURL.voidsetOrigin(StyleOrigin origin) Sets the origin of thisStylesheet.toString()Returns a string representation of this object.
- 
Method Details- 
getUrlThe URL from which thisStylesheetwas loaded.- Returns:
- A Stringrepresentation of the URL from which the stylesheet was loaded, ornullif the stylesheet was created from an inline style.
 
- 
getOriginReturns the origin of thisStylesheet.- Returns:
- the origin of this Stylesheet
 
- 
setOriginSets the origin of thisStylesheet.- Parameters:
- origin- the origin of this- Stylesheet
 
- 
getRules
- 
getFontFaces
- 
equals
- 
toString
- 
loadBinaryLoads a binary stylesheet from aURL.- Parameters:
- url- the- URLfrom which the- Stylesheetwill be loaded
- Returns:
- the loaded Stylesheet
- Throws:
- IOException- if the binary stream corresponds to a more recent binary css version or if an I/O error occurs while reading from the stream
 
- 
loadBinaryLoads a binary stylesheet from a stream.- Parameters:
- stream- the input stream
- Returns:
- the loaded Stylesheet
- Throws:
- IOException- if the binary stream corresponds to a more recent binary css version or if an I/O error occurs while reading from the stream
- Since:
- 17
 
- 
convertToBinaryConverts the css file referenced bysourceto binary format and writes it todestination.- Parameters:
- source- the JavaFX compliant css file to convert
- destination- the file to which the binary formatted data is written
- Throws:
- IOException- if the destination file can not be created or if an I/O error occurs
- IllegalArgumentException- if either parameter is- null, if- sourceand- destinationare the same, if- sourcecannot be read, or if- destinationcannot be written
 
 
-