This is the forum for JIDE Common Layer which is open sourced at
https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.
Moderator: JIDE Support
Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.
by mwendt » Wed Mar 19, 2014 4:42 am
Hello,
I'm using JIDE 3.5.13 and a CheckBoxTree. Is there a way to set the icons for collapsed/expanded nodes (root handlers) per instance?
I've tried using putClientProperty("Tree.expandedIcon", ...), but this does not work.
Thanks in advance.
-
mwendt
-
- Posts: 23
- Joined: Thu Mar 07, 2013 1:10 pm
by JIDE Support » Wed Mar 19, 2014 9:30 am
We didn't add any extra in CheckBoxTree. Whatever you can do to the JTree, it is the same as CheckBoxTree. As far as I know, you need to get the BasicTreeUI (only if you are using BasicTreeUI or its subclasses) and call setExpandedIcon on the UI class.
JIDE Software Technical Support Team
-
JIDE Support
- Site Admin
-
- Posts: 37263
- Joined: Sun Sep 14, 2003 10:49 am
-
by mwendt » Wed Mar 19, 2014 9:54 am
Thank you. I did it that way in the meantime anyway and it works

For the sake of completeness:
- Code: Select all
// change icons for a tree instance
try {
final BasicTreeUI btui = (BasicTreeUI) tree.getUI();
btui.setExpandedIcon(myExpandIcon);
btui.setCollapsedIcon(myCollapseIcon);
} catch (ClassCastException cce) { ... }
// OR: change icons globally
// UIManager.put("Tree.expandedIcon", myExpandIcon);
// UIManager.put("Tree.collapsedIcon", myCollapseIcon);
-
mwendt
-
- Posts: 23
- Joined: Thu Mar 07, 2013 1:10 pm
Return to JIDE Common Layer Open Source Project Discussion (Community Driven)
Who is online
Users browsing this forum: No registered users and 14 guests