Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] running sweet

Mark Proctor wrote:

I've just seen that CompositeTable does implement virtual tables,
although not quite sure how that works - seems to create a new internal
table for each redraw.

Nope. When you build a UI, you create a custom control that extends Composite. You drop this into CompositeTable to tell CompositeTable what your row looks like. CompositeTable uses reflection to get a Constructor object (the Star Trek replicator (tm) object) and then duplicates your row object for as many rows as are visible at a given time. Scrolling is implemented by rearranging these Composites. For example, to scroll down by a line, CompositeTable does the following:

- Move every row object up by 1 row.
- Move the top row object to the bottom row position.
- Fire a row refresh event to ask the content provider to refresh the bottom row with new data.

So redraws are very efficient. On Linux/GTK my keyboard can't repeat enough to cause CompositeTable to get behind, although there are a few other places where the Linux/GTK implementation is slow enough that my keyboard autorepeat can out-type it.

Does a Composite per row mean you wont be able to
do vertical merges?

Not sure what you mean here?

Best,

Dave Orme

--
Objects are here to stay.  http://www.db4o.com

PGP Public Key (for confidential communications):
http://www.coconut-palm-software.com/~djo/public_key.txt



Back to the top