DigiGod Q Frasch� wrote:
> 
> I just looked at the JOSToolkit peers done by sean cribbs, currently the
> way its set up its like this:
> 
> (Component)-[peer]--(JComponent)-[ui]
> 
> which is good for now, but I think the optimal setup is making the peer
> a quasicomponent that lets the swing ui class plug directly into it,
> like:
> 
> (Component)-[peer]-[ui]
> 
> At the very least it would take up less memory and probably be a tad
> faster.
> 

I agree that a direct ui connection would be much faster, however, I
chose to create them the first way for several reasons:

1) We don't have to implement the peer-level functionality of each
component, we only have to make wrappers to the already-implemented
functionality of the Swing-level component.
2) If the user decides to change the look and feel, the peers would have
to be notified in some way so that they don't maintain links to the old
UI delegates.
3) Wrapping Swing components into the peers is easier than using the
delegates (i.e. I'm lazy).  Besides, when a UI is asked to draw, it
requires a JComponent to be passed.  Why not just leave all of the
complications to Swing?

Anyway, that's my 2c in my defense.

Later,

Sean

_______________________________________________
UI maillist  -  [EMAIL PROTECTED]
http://jos.org/mailman/listinfo/ui

Reply via email to