public class Stylesheet extends Object
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.
Constructor and Description |
---|
Stylesheet()
Constructs a stylesheet with the base URI defaulting to the root
path of the application.
|
Stylesheet(String url)
Constructs a Stylesheet using the given URL as the base URI.
|
Modifier and Type | Method and Description |
---|---|
static void |
convertToBinary(File source,
File destination)
Convert the .css file referenced by urlIn to binary format and write to urlOut.
|
boolean |
equals(Object obj) |
List<FontFace> |
getFontFaces() |
StyleOrigin |
getOrigin() |
List<Rule> |
getRules() |
String |
getUrl()
The URL from which the stylesheet was loaded.
|
int |
hashCode() |
void |
importStylesheet(Stylesheet importedStylesheet) |
static Stylesheet |
loadBinary(URL url)
Load a binary stylesheet file from a input stream
|
void |
setOrigin(StyleOrigin origin) |
String |
toString()
Returns a string representation of this object.
|
public Stylesheet()
public Stylesheet(String url)
url
- public String getUrl()
public StyleOrigin getOrigin()
public void setOrigin(StyleOrigin origin)
public String toString()
public static Stylesheet loadBinary(URL url) throws IOException
IOException
public static void convertToBinary(File source, File destination) throws IOException
source
- is the JavaFX .css file to convertdestination
- is the file to which the binary conversion is writtenIOException
IllegalArgumentException
- if either parameter is null, if source and destination are the same,
if source cannot be read, or if destination cannot be written.public void importStylesheet(Stylesheet importedStylesheet)
Copyright © 2020. All rights reserved.