Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Typical code in CssStyleHelper is Styleable parent = node.getStyleableParent(); CssStyleHelper styleHelper = this; while (parent != null) { styleHelper = parent instanceof Node ? ((Node)parent).styleHelper : null; if (styleHelper != null) break; parent = parent.getStyleableParent(); } If you are deep in the scene graph, it may be that you get to the Control and have to go through several parents to get to the root style helper. If CssStyleHelper had a ref to a parent CssStyleHelper, then this code is just. CssStyleHelper styleHelper = this.getParentStyleHelper(); Maybe parent isn't such a good name for it. Maybe "upstream"?
|