Top Inners Fields Constructors Methods
fr.brouillard.oss.cssfx

public Class CSSFX

extends Object
Class Inheritance
Imports
java.util.Arrays, .LinkedHashSet, .Set, java.util.concurrent.Callable, javafx.collections.FXCollections, .ObservableList, javafx.scene.Node, .Scene, javafx.stage.Stage, .Window, fr.brouillard.oss.cssfx.api.URIToPathConverter, fr.brouillard.oss.cssfx.impl.CSSFXMonitor, .URIToPathConverters, fr.brouillard.oss.cssfx.impl.log.CSSFXLogger, .CSSFXLogger.LogLevel

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CSSFX.CSSFXConfig

Stores information before finally building/starting the CSS monitoring.

Field Summary

Modifier and TypeField and Description
private static boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static CSSFX.CSSFXConfig

Returns:

a CSSFXConfig object as a builder to allow further configuration
addConverter
(URIToPathConverter
an additional converter to use, ignored if null
converter
)

Register a new converter that will be used to map CSS resources to local file.

public static CSSFX.CSSFXConfig

Returns:

a CSSFXConfig object as a builder to allow further configuration
onlyFor
(Window
the window to restrict the detection on, if null then no restriction will apply
window
)

Restrict the source file detection for graphical sub-tree of the given Stage

public static CSSFX.CSSFXConfig

Returns:

a CSSFXConfig object as a builder to allow further configuration
onlyFor
(Scene
the scene to restrict the detection on, if null then no restriction will apply
s
)

Restrict the source file detection for graphical sub-tree of the given Scene

public static CSSFX.CSSFXConfig

Returns:

a CSSFXConfig object as a builder to allow further configuration
onlyFor
(Node
the node to restrict the detection on, if null then no restriction will apply
n
)

Restrict the source file detection for graphical sub-tree of the given Node

public static synchronized Runnable

Returns:

a Runnable object to stop CSSFX monitoring
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
public static Runnable

Returns:

a Runnable object to stop CSSFX monitoring
start
(Window
the window that will be monitored
window
)

Directly start monitoring CSS for the given Window.

public static Runnable

Returns:

a Runnable object to stop CSSFX monitoring
start
(Scene
the scene that will be monitored
scene
)

Directly start monitoring CSS for the given Scene.

public static Runnable

Returns:

a Runnable object to stop CSSFX monitoring
start
(Node
the node that will be monitored
node
)

Directly start monitoring CSS for the given node.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isCssFXStartedback to summary
private static boolean isCssFXStarted

Constructor Detail

CSSFXback to summary
public CSSFX()

Method Detail

addConverterback to summary
public static CSSFX.CSSFXConfig addConverter(URIToPathConverter converter)

Register a new converter that will be used to map CSS resources to local file.

Parameters
converter:URIToPathConverter

an additional converter to use, ignored if null

Returns:CSSFX.CSSFXConfig

a CSSFXConfig object as a builder to allow further configuration

onlyForback to summary
public static CSSFX.CSSFXConfig onlyFor(Window window)

Restrict the source file detection for graphical sub-tree of the given Stage

Parameters
window:Window

the window to restrict the detection on, if null then no restriction will apply

Returns:CSSFX.CSSFXConfig

a CSSFXConfig object as a builder to allow further configuration

onlyForback to summary
public static CSSFX.CSSFXConfig onlyFor(Scene s)

Restrict the source file detection for graphical sub-tree of the given Scene

Parameters
s:Scene

the scene to restrict the detection on, if null then no restriction will apply

Returns:CSSFX.CSSFXConfig

a CSSFXConfig object as a builder to allow further configuration

onlyForback to summary
public static CSSFX.CSSFXConfig onlyFor(Node n)

Restrict the source file detection for graphical sub-tree of the given Node

Parameters
n:Node

the node to restrict the detection on, if null then no restriction will apply

Returns:CSSFX.CSSFXConfig

a CSSFXConfig object as a builder to allow further configuration

startback to summary
public static synchronized 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:Runnable

a Runnable object to stop CSSFX monitoring

startback to summary
public static Runnable start(Window window)

Directly start monitoring CSS for the given Window.

Parameters
window:Window

the window that will be monitored

Returns:Runnable

a Runnable object to stop CSSFX monitoring

startback to summary
public static Runnable start(Scene scene)

Directly start monitoring CSS for the given Scene.

Parameters
scene:Scene

the scene that will be monitored

Returns:Runnable

a Runnable object to stop CSSFX monitoring

startback to summary
public static Runnable start(Node node)

Directly start monitoring CSS for the given node.

Parameters
node:Node

the node that will be monitored

Returns:Runnable

a Runnable object to stop CSSFX monitoring

fr.brouillard.oss.cssfx back to summary

public Class CSSFX.CSSFXConfig

extends Object
Class Inheritance

Stores information before finally building/starting the CSS monitoring.
Author
Matthieu Brouillard

Field Summary

Modifier and TypeField and Description
private final Set<URIToPathConverter>
private Node
private Scene
private Window

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public CSSFX.CSSFXConfig

Returns:

a CSSFXConfig object as a builder to allow further configuration
addConverter
(URIToPathConverter
an additional converter to use, ignored if null
converter
)

Register a new converter that will be used to map CSS resources to local file.

public CSSFX.CSSFXConfig

Returns:

a CSSFXConfig object as a builder to allow further configuration
noDefaultConverters
()

Empty the list of default converters.

pack-priv void
setRestrictedToNode(Node restrictedToNode)

pack-priv void
setRestrictedToScene(Scene restrictedToScene)

pack-priv void
setRestrictedToWindow(Window restrictedToWindow)

public Runnable

Returns:

a Runnable object to stop CSSFX monitoring
start
()

Start monitoring CSS resources with the config parameters collected until now.

private Runnable
start(Callable<CSSFXMonitor> monitorBuilder)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

convertersback to summary
private final Set<URIToPathConverter> converters
restrictedToNodeback to summary
private Node restrictedToNode
restrictedToSceneback to summary
private Scene restrictedToScene
restrictedToWindowback to summary
private Window restrictedToWindow

Constructor Detail

CSSFXConfigback to summary
pack-priv CSSFXConfig()

Method Detail

addConverterback to summary
public CSSFX.CSSFXConfig addConverter(URIToPathConverter converter)

Register a new converter that will be used to map CSS resources to local file.

Parameters
converter:URIToPathConverter

an additional converter to use, ignored if null

Returns:CSSFX.CSSFXConfig

a CSSFXConfig object as a builder to allow further configuration

noDefaultConvertersback to summary
public CSSFX.CSSFXConfig noDefaultConverters()

Empty the list of default converters. Especially usefull for testing purposes where full control of the converters is required.

Returns:CSSFX.CSSFXConfig

a CSSFXConfig object as a builder to allow further configuration

setRestrictedToNodeback to summary
pack-priv void setRestrictedToNode(Node restrictedToNode)
setRestrictedToSceneback to summary
pack-priv void setRestrictedToScene(Scene restrictedToScene)
setRestrictedToWindowback to summary
pack-priv void setRestrictedToWindow(Window restrictedToWindow)
startback to summary
public Runnable start()

Start monitoring CSS resources with the config parameters collected until now.

Returns:Runnable

a Runnable object to stop CSSFX monitoring

startback to summary
private Runnable start(Callable<CSSFXMonitor> monitorBuilder)