CheckBoxList#setCheckBoxEnabled(false) behavior

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.

CheckBoxList#setCheckBoxEnabled(false) behavior

Postby pablovilas » Tue Apr 09, 2013 10:18 am

Hello,

Actually CheckBoxList#setCheckBoxEnabled(false) has this behavior:

all_disabled.png
all_disabled.png (7.08 KiB) Viewed 13968 times


It Disables all rows components, I think this is the way that should behave:

checkbox_diable.png
checkbox_diable.png (6.94 KiB) Viewed 13968 times


Only checkbox it's disabled. To do that I modify CheckBoxListCellRenderer#getListCellRendererComponent() and comment:

Code: Select all
 // copy the background and foreground for the renderer component
setBackground(listCellRendererComponent.getBackground());
listCellRendererComponent.setBackground(null);
setForeground(listCellRendererComponent.getForeground());
listCellRendererComponent.setForeground(null);
// I commented this line:
//listCellRendererComponent.setEnabled(_checkBox.isEnabled());


Thank you.
pablovilas
 
Posts: 45
Joined: Wed Aug 31, 2011 10:13 am

Re: CheckBoxList#setCheckBoxEnabled(false) behavior

Postby JIDE Support » Tue Apr 09, 2013 10:44 am

Thanks for sharing. However, we prefer to disable the text to make sure the end user won't be confused.

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

Re: CheckBoxList#setCheckBoxEnabled(false) behavior

Postby pablovilas » Tue Apr 09, 2013 11:10 am

I see, thank you.
pablovilas
 
Posts: 45
Joined: Wed Aug 31, 2011 10:13 am


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

Who is online

Users browsing this forum: No registered users and 7 guests

cron