Skip to content
This repository has been archived by the owner on Jul 10, 2018. It is now read-only.

Can the tree collapsed / expanded icons be changed? #37

Closed
patrickgell opened this issue Jul 27, 2017 · 1 comment
Closed

Can the tree collapsed / expanded icons be changed? #37

patrickgell opened this issue Jul 27, 2017 · 1 comment

Comments

@patrickgell
Copy link

Is there a possibility to change the default collapsed (plus sign) and expanded (minus sign) of a tree? Default Java way of setting the icons in the UIMangager doesn't seem to work:

UIManager.put("Tree.collapsedIcon",  new ImageIcon(...));
UIManager.put("Tree.expandedIcon",  new ImageIcon(...));
@kirill-grouchnikov
Copy link
Owner

UIManager is a rather brittle way for an app to fine-tune what a specific look-and-feel does. I don't see it as a supported API for this.

The primary goal of Substance is to provide a cohesive set of visuals that respect the top-level skin set on the specific root pane and scale properly on high-resolution devices and different font policies.

You can in theory extend SubstanceTreeUI and its installDefaults to pass different values to setExpandedIcon / setCollapsedIcon. This should work now, but no guarantees about future behavior.

And, once again, I don't see any UIManager entries as the API surface that Substance will respect. At most, you can see that as read-only table for the values that Substance uses internally, but even that is a very rough approximation since there are a lot of dynamic visual aspects that depend on screen resolution, font policy, component font size and root pane skin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants