focusmanager (was todo-2004-01-14)

Charles Goodwin <[email protected]> Thu, 15 Jan 2004 03:31:15 +0000
Newsgroups gmane.comp.java.xwt.widgets
Organization XWT Foundation
Message-ID <[email protected]>
On Wed, 2004-01-14 at 08:09, David Crawshaw wrote:
> There are some things missing, but I really couldn't put them in until 
> clickable, etc is working. If you find any, I'd like to do them if you 
> could send an message.

I've just committed xwt.lib.focusmanager - based on focuspane.  If you
have a look at that, it covers most things.

Important points:
- everything changed from funcs to traps (a little nicer?)
- nextfocus/prevfocus no longer change the focus, just return the
  candidate for focus - which is how it needs to be so widgets can
  optionally accept/reject/pass focus
- lots of important checks to evade failure scenarios - the idea
  being that focusable/focusmanager become pretty much failsafe

I've not touched focusable to reflect this and it is untested, but I
wanted across some of the important semantics without having to debate
them.  We (mainly Rod and I) did a _lot_ of testing and usage of
focusable in the old widgets and it is important to carry across some of
the lessons learnt.

I originally didn't like the idea of focusmanager, but in retrospect it
is really good.  It's a lot easier to manage than the whole 'functions
in static' approach that was taken before.

It is literally splitting the old focusable static content out into
focusmanager which means a lot of the semantics do translate very well,
although I've adapted it completely to your model (no added
functions/traps) which is a good base.

I'll get testing with border/focusable/button tomorrow and see what I
can produce.
-- 
- Charlie

The future of the net - www.xwt.org

Charles Goodwin <[email protected]>
  Member of the XWT Foundation