Skip to main content

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

virtual table stuff sounds great.
With regards to merge I mean if you merge two cells, one above the other, or even a block of 4x4 cells.

Mark
David J. Orme wrote:

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




Back to the top