On 15 June 2011 22:50, Edvin Syse <[email protected]> wrote:
> TerraTreeViewSkin skin = (TerraTreeViewSkin) getSkin();
> int baseNodeX = path.getLength() * (skin.getIndent() +
> skin.getSpacing());
>
If all you need are the 'indent' and 'spacing', they are properties of the
skin, and therefore available as styles via the TreeView. You can avoid
casting the skin to TerraTreeViewSkin and accessing its properies directly.
treeView.getStyles().get("indent");
treeView.getStyles().get("spacing");
In reality that doesn't really help much though, as you are still relying on
those styles being there, and also relying on the fact that they behave
exactly as they do in TerraTreeViewSkin.
Chris