check box tree

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.

check box tree

Postby RajaRajeswari_V » Mon Jul 13, 2009 10:47 am

Hi,


I have one problem while using the checkbox tree.. is there any way to not dispaly the check box for the tree root node. for example


Root
child1
chldd2
child3

i want to show the check box for the childs only but not the root node.. is thery any way to do this please advice
RajaRajeswari_V
 
Posts: 25
Joined: Tue Apr 28, 2009 8:33 pm

Re: check box tree

Postby JIDE Support » Mon Jul 13, 2009 11:20 am

Please try use JTree#setRootVisible(false).

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: check box tree

Postby RajaRajeswari_V » Tue Jul 14, 2009 11:54 am

it is not displaying the root node also.but i want to dispaly root node without check box..please help me out
RajaRajeswari_V
 
Posts: 25
Joined: Tue Apr 28, 2009 8:33 pm

Re: check box tree

Postby JIDE Support » Tue Jul 14, 2009 4:58 pm

Please try override CheckBoxTree#isCheckBoxVisible() with the following line.

Code: Select all
                return path.getPathCount() != 1;


Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: check box tree

Postby sbrattla » Thu Jul 16, 2009 2:40 am

That's what i did too:

Code: Select all
public class KeywordCheckBoxTree extends CheckBoxTree {

    public boolean isCheckBoxVisible(TreePath path) {
        if (path.getLastPathComponent() instanceof Keyword) {
            return true;
        } else {
            return false;
        }
    }

}
sbrattla
 
Posts: 20
Joined: Wed Apr 01, 2009 2:38 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 78 guests