CSS vs API modifications in *View classes

Tom Schindl tom.schindl at bestsolution.at
Wed May 28 10:35:49 UTC 2014


All views in JavaFX are virtual and the Cell instances are reused but
this brings with it the problem that if you once modified a CSS
styleable value (e.g. the textfill, font, ...) you are unable to return
to a state where a CSS could be applied.

I think Cell needs to provide reset methods for properties who are
styleable so that one can set back the cell into a css-styleable state,
or maybe we want this to be more general and we need to provide a method
for all properties who are styled so that we can reset them?

I could imagine Node having a method: restoreInitialPropertyState()
which subclasses need to implement to restore all its properties to be
css styleable.

For Cell i think there's no way around that because it is reused and
needs to have a way to get back to the original state.


More information about the openjfx-dev mailing list