On Wed, 30 Sep 2026 22:58:45 GMT, John Hendrikx <[email protected]> wrote:
>> I was wondering as well but I don't know really. >> The whole `Styleable` thing is weird. >> >> Usually, each `Styleable` is just some form of API/Contract which later >> results in a `Node` with the styles you added. Since only a `Node` can be >> added into the scene graph. >> >> Example: `Tab` is a `Styleable` but will never be observed here in the >> `CssStyleHelper`. >> Instead, it will be a `TabHeaderSkin` which will receive all style(classe)s >> from `Tab`. >> Same for `MenuItem`, which will be a `MenuItemContainer`. >> >> So I don't know why this `Styleable` thing exists here. And also there is >> `Styleable.getStyleableNode()` since JavaFX 9, which again raises more >> questions in my head. >> Like, why is it not used here, why does it exists,... > > I think that TODO pre-dates `getStyleableNode` by a few years, so I think it > can be resolved now. It is a shame that when they added `getStyleableNode` > they didn't simply have `Node` implement it with a final method returning > `this` (although I think we could still do that as it is unlikely anybody is > relying on it not being final for `Node`s). > > It sounds like something for a different PR though. I was also wondering if `getStyleableNode()` is really needed or should be rather deprecated. As all implementations look very weird, trying to find the correct `Node` by inspecting the children (by using the skin). And I'm not even sure it really is called actually. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2333#discussion_r4154216897
