java.lang.Object
io.github.palexdev.materialfx.css.MFXCSSBridge
Helper class which is responsible for parsing the stylesheets for a given
Parent.
The list is automatically rebuilt if the parent's stylesheets change.
This approach is very simple yet effective (ffs even a baby could make it), but it has a limitation at the moment. The stylesheets parsing is limited to the specified parent, it won't scan the entire scenegraph, I could also implement something like that, it's simple, it's just needed to mimic the behavior of the JavaFX' StyleManager, but at the moment I don't think it's really useful, so... we'll see in future if needed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the listener responsible for updating the stylesheets list to the parent's stylesheets observable list.voiddispose()Disposes the MFXCSSBridge by removing the stylesheetsChanged listener.voidCalled by the constructor the first time.void
-
Constructor Details
-
MFXCSSBridge
-
-
Method Details
-
initializeStylesheets
public void initializeStylesheets()Called by the constructor the first time.Responsible for parsing and building the stylesheets list.
-
addListeners
public void addListeners()Adds the listener responsible for updating the stylesheets list to the parent's stylesheets observable list. -
dispose
public void dispose()Disposes the MFXCSSBridge by removing the stylesheetsChanged listener. -
getParent
-
setParent
-
getStylesheets
- Returns:
- the parsed stylesheets list
-