pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noel Grandin <noelgran...@gmail.com>
Subject Re: [jira] [Commented] (PIVOT-798) Component#isEnabled does not affect appearance recursively
Date Sat, 08 Oct 2011 08:10:22 GMT
On Sat, Oct 8, 2011 at 01:49, Bill van Melle (Commented) (JIRA)
<jira@apache.org> wrote:
> In particular, it is important that setting enabled to true for the container not suddenly
enable children that had been disabled before the container was >disabled.

This is what makes any solution extremely hard. What happens if I do this:

What is the right set of children to re-enable?
There is no right answer.

I do not believe that we can build behaviour that will satisfy all use-cases.
The best we can do is to provide some tools to make it easier to
achieve various ends.

To that end, my proposed solution is:
(1) setEnabled(boolean) does what it does now
(2) setEnabledRecursive(boolean) is defined at the Container level,
walks all the way down it's tree, affecting every element.

If you want behaviour different from this, you will have to override
setEnabled() and setEnabledRecursive() and implement your own logic.

Anything else is simply not going to satisfy all users. I know - I've
had this discussion before on the SwingX mailing list.

-- Noel Grandin

View raw message