<AWT Dev> Ideas about improved architecture of the generic Swing peers
Andrei V. Dmitriev
Andrei.Dmitriev at Sun.COM
Fri Sep 5 07:13:08 PDT 2008
Hi Roman,
Roman Kennke wrote:
>> I spent some time walking around the new code and found
>> this pretty much similar to a prototype which existed by this moment for
>> a - week or something. :)
>
> Cool. So maybe it's a good idea to decide for one of the two prototypes,
> either you push out your stuff in the open and we work together on that,
> or we continue together on the Cacio peers. What do you think? It
> doesn't seem to make sense to develop two implementations in parallel...
Right, but the thing is the progress there is more than poor - can't
afford much time spending on that. Anyway, that is a hack into the
XToolkit stack directly and that saved me a lot of time as there is no
need to build the hierarchy from "scratch", just picked the existing
stuff up.
I realize that solution isn't so flexible and are considered like a
proof of concept.
>
>> You did inherited from the SunToolkit class and left Runnable aside.
>> Perhaps this could save some more lines of code.
>
> Surely. I'm not sure yet what SunToolkit has to do with Runnable, but I
> guess I'll study the code and learn :-)
>
>
>> As a matter of fact I also tried some more complicated AWT test which I
>> believe covers all components and failed on TextArea peer
>> initialization.
>
> Yeha! I only implemented Window, Frame, Canvas, Button and Label so far.
> The other toplevels and Panel seem to be some more low hanging fruits.
> The text components shouldn't be so bad - I already had these working to
> some degree in the old Swing peers of GNU Classpath. What I'm really
> scared about are the compound components like Scrollpane and Choice and
> the Menu related stuff.
Sigh, agree, that must be a scrupulous job. XChoice peer has never been
in a good shape. :)
Thanks,
Andrei
>
>> The good thing is we actually have semi-lightweight peer
>> for text components in X11 code so we probably may be kept from part of
>> this work. Just in case you haven't realized that yet. :)
>
> Yeah, I've seen that. Very cool. Infact, my inspiration for all this is
> both the XAWT peers of OpenJDK and my old work on GNU Classpath, and to
> me, this new code is a merge of ideas from both.
>
>> Thanks,
>> Andrei
>
> Thank you!
>
> /Roman
>
More information about the caciocavallo-dev
mailing list