New util: group + list improvements

Charles Goodwin <[email protected]> Mon, 03 Nov 2003 14:44:41 +0000
Newsgroups gmane.comp.java.xwt.widgets
Organization XWT Foundation
Message-ID <[email protected]>
Since focusable, groupable, popupable, and draggable all make use of 
arbitrary widget grouping where implementation was about 75% similar, 
I'm abstracting the grouping to xwt.util.group.

It will basically hold a super group of subgroups:
var group = { sub : [] };

Obviously, each implementation will specify it's own conditions for 
addition and removal from of widgets from a group.

The advantage of this is that group improvements will be reflected 
across all widgets as opposed to each one being individually updated.

Note that this is completely different to xwt.widget.group / <group /> 
in that this handles only the mechanism for grouping widgets as required 
by an abstract class as opposed to being a way of grouping widgets 
together explicitly in XWT.

Also, one of the benefits of abstracting list to xwt.util.list is that 
improvements to list will benefit anything using it.

At some point in the not-so-far-away-future I'll add buckets (iirc 
that's the correct term) to xwt.util.list to help the performance of 
large lists - something similar to how hashes are implemented in perl. 
ie a larger list gets broken into smaller 'buckets' which are obviously 
quicker to work on and hence perform better.

Work on visible widgets has been slow.  Attempts to 'theme' in Nitrogen 
have been unsuccessful as I do not overly understand the syntax of 
grafting and questions to the [email protected] list have largely fallen on 
deaf ears given their workload.  Hopefully that'll get sorted sooner 
rather than later.

- Charlie