Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advanced SWT table widgets

Tags:

swt

nattable

There are a couple of "advanced" table/spreadsheet SWT widgets out there (Nattable, Nebula Grid), but none of them support really large datasets. Nattable is the one which comes closest, but it still has limitations in the datatypes it uses causing the number of rows in the table to become far to limited.

I need to be able to represent at least 2^32 rows, preferrably 2^64.

like image 491
JesperE Avatar asked May 31 '26 21:05

JesperE


2 Answers

SWT Matrix breaks the capacity bariers allowing any BigInteger amount of rows or columns. It is closed source, but free for private and non-commercial use. Early alpha release though at this point.

like image 55
Jacek Kołodziejczyk Avatar answered Jun 02 '26 21:06

Jacek Kołodziejczyk


What's wrong with SWT.VIRTUAL with a reguar table? You can then use a LazyContentProvider, which gives you a callback for loading what's needed in the view.

Something like this...

TableViewertableViewer = new TableViewer(parent, SWT.VIRTUAL|SWT.BORDER|SWT.V_SCROLL);
// skipping the noise
tableViewer.setItemCount(100000);
tableViewer.setContentProvider(new LazyContentProvider());
tableViewer.setLabelProvider(new TableLabelProvider());
tableViewer.setUseHashlookup(true);
tableViewer.setInput(null);
like image 36
andyczerwonka Avatar answered Jun 02 '26 21:06

andyczerwonka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!