- java.lang.Object
-
- fr.brouillard.oss.cssfx.CSSFX
-
public class CSSFX extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCSSFX.CSSFXConfigStores information before finally building/starting the CSS monitoring.
-
Constructor Summary
Constructors Constructor Description CSSFX()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CSSFX.CSSFXConfigaddConverter(URIToPathConverter converter)Register a new converter that will be used to map CSS resources to local file.static CSSFX.CSSFXConfigonlyFor(javafx.scene.Node n)Restrict the source file detection for graphical sub-tree of the givenNodestatic CSSFX.CSSFXConfigonlyFor(javafx.scene.Scene s)Restrict the source file detection for graphical sub-tree of the givenScenestatic CSSFX.CSSFXConfigonlyFor(javafx.stage.Window window)Restrict the source file detection for graphical sub-tree of the givenStagestatic Runnablestart()Directly start monitoring the CSS of the application using defaults: standard source file detectors: Maven, Gradle, execution from built JAR (details inURIToPathConverters.DEFAULT_CONVERTERS) detection activated on all stages of the application, including the ones that will appear later onstatic Runnablestart(javafx.scene.Node node)Directly start monitoring CSS for the given node.static Runnablestart(javafx.scene.Scene scene)Directly start monitoring CSS for the given Scene.static Runnablestart(javafx.stage.Window window)Directly start monitoring CSS for the given Window.
-
-
-
Method Detail
-
start
public static Runnable start()
Directly start monitoring the CSS of the application using defaults:- standard source file detectors: Maven, Gradle, execution from built JAR (details in
URIToPathConverters.DEFAULT_CONVERTERS) - detection activated on all stages of the application, including the ones that will appear later on
- Returns:
- a Runnable object to stop CSSFX monitoring
- standard source file detectors: Maven, Gradle, execution from built JAR (details in
-
start
public static Runnable start(javafx.stage.Window window)
Directly start monitoring CSS for the given Window.- standard source file detectors: Maven, Gradle, execution from built JAR (details in
URIToPathConverters.DEFAULT_CONVERTERS) - detection activated on the given Window only (and its children)
- Parameters:
window- the window that will be monitored- Returns:
- a Runnable object to stop CSSFX monitoring
- standard source file detectors: Maven, Gradle, execution from built JAR (details in
-
start
public static Runnable start(javafx.scene.Scene scene)
Directly start monitoring CSS for the given Scene.- standard source file detectors: Maven, Gradle, execution from built JAR (details in
URIToPathConverters.DEFAULT_CONVERTERS) - detection activated on the scene only (and its children)
- Parameters:
scene- the scene that will be monitored- Returns:
- a Runnable object to stop CSSFX monitoring
- standard source file detectors: Maven, Gradle, execution from built JAR (details in
-
start
public static Runnable start(javafx.scene.Node node)
Directly start monitoring CSS for the given node.- standard source file detectors: Maven, Gradle, execution from built JAR (details in
URIToPathConverters.DEFAULT_CONVERTERS) - detection activated on the node only (and its children)
- Parameters:
node- the node that will be monitored- Returns:
- a Runnable object to stop CSSFX monitoring
- standard source file detectors: Maven, Gradle, execution from built JAR (details in
-
onlyFor
public static CSSFX.CSSFXConfig onlyFor(javafx.stage.Window window)
Restrict the source file detection for graphical sub-tree of the givenStage- Parameters:
window- the window to restrict the detection on, if null then no restriction will apply- Returns:
- a
CSSFX.CSSFXConfigobject as a builder to allow further configuration
-
onlyFor
public static CSSFX.CSSFXConfig onlyFor(javafx.scene.Scene s)
Restrict the source file detection for graphical sub-tree of the givenScene- Parameters:
s- the scene to restrict the detection on, if null then no restriction will apply- Returns:
- a
CSSFX.CSSFXConfigobject as a builder to allow further configuration
-
onlyFor
public static CSSFX.CSSFXConfig onlyFor(javafx.scene.Node n)
Restrict the source file detection for graphical sub-tree of the givenNode- Parameters:
n- the node to restrict the detection on, if null then no restriction will apply- Returns:
- a
CSSFX.CSSFXConfigobject as a builder to allow further configuration
-
addConverter
public static CSSFX.CSSFXConfig addConverter(URIToPathConverter converter)
Register a new converter that will be used to map CSS resources to local file.- Parameters:
converter- an additional converter to use, ignored if null- Returns:
- a
CSSFX.CSSFXConfigobject as a builder to allow further configuration
-
-