xwt.lib <> xwt.lib.abstract ethos
Charles Goodwin <[email protected]>
| Newsgroups | gmane.comp.java.xwt.widgets |
|---|---|
| Message-ID | <308906BE5D07D5119285009027D61C5722F73B@NTFPS1> |
I just wanted to get across how and why I'm splitting up lib files between xwt.lib and xwt.lib.abstract. Firstly, some term clarification. I consider there to be 2 types of preapplies. Vital and non-vital. An example of a non-vital preapply is focusable for a button, check, or radio etc. They'll work without it, at the loss of some functionality. An example of a vital preapply is repeatable for clickable. Clickable works around repeatable*. * Actually, this might change but probably not I consider there to be 2 types of themebox traps. Again, vital and non-vital. Vital themebox traps as basically boxen without which the widget won't work. Non-vital themebox traps implement common but not generic behaviour (eg spacer boxen). Code goes in xwt.lib for one of these reasons: 1) It depends upon a non-vital preapply 2) It's a non-vital themebox trap 3) It's non-minimal or performance affecting eg tab dragging for tabpane; a mobile device / minimal theme will not want this Everything else, at least anything that I can think of for the moment, belongs in xwt.lib.abstract. David considers this unecessary but my view is that it gives the following advantages: 1) More flexible lib code; easier to implement custom themes without copy/pasting code 2) Easier code management; editing large files is not as easy as editing smaller ones 3) Easier bug management; with behaviour being dictated to one of two files rather than one big one, it's easier to track down Anyway, this is the approach I'm taking since it appears I'm the sole 'mover' of stuff to the new namespace layout. I hope to have moved to the new namespace completely by either the end of tomorrow or friday. Once I and Rod have the major widgets ready I'd appreciate some testing. I'll ask for it, I expect, at the start of next week. The major widgets, off the top of my head: button, check, radio, tabpane, tree, group, list, dropdown, spin, text, textare, label, scrollpane, slider, bevel, tooltip