AWT peers (Was: [PATCH] More List fixes)

Tom Tromey tromey@redhat.com
Tue Dec 16 17:29:00 GMT 2003


>>>>> ">" == S Meslin-Weber <twiun@adorphuye.com> writes:

>> See below for a list of independent open source AWT peer
>> implementations.

Thanks.  This is great information, good arguments I think for us to
aim for compatibility.

>> I disagree, although undocumented by Sun, Sun's Peer interface is
>> reasonably well structured and intuitive to implement

One problem we've run into has to do with List.  With the Gtk peers,
and the replace operation implemented as "remove + add", we get
flickering.  So Fernando's first solution -- entirely reasonable IMO
-- was to add a new "replace" method to ListPeer.

What would you suggest for a case like this?

One idea is to somehow suppress Gtk redisplay while some java-side
lock is held.  We're pretty reluctant to do this, though.

Another idea we came up with is to have a new
"gnu.java.awt.peer.ClasspathListPeer" interface that extends ListPeer
and adds the new method we want.  Then the java code can decide what
to do dynamically.  This is compatible but also allows us to make
extensions when necessary.

Tom



More information about the Java mailing list