Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » adding content to a table if user scrolls down
adding content to a table if user scrolls down [message #466191] Wed, 04 January 2006 18:53 Go to next message
Eclipse UserFriend
Originally posted by: ingo.siebertNOSPAM.cas.de

Hi!

Question:
I load 100 rows from the DB and add them to the table.
If the vertical ScrollBar of table has a value of
(scrollBar.getMaximum() / 3)
i want to load the next 100 rows and add them to the table.



It got that working.
But i tested it at a very big monitor and the 100 rows has been place
nearly complete at the table, so the value of the scrollbar never
reached (scrollBar.getMaximum() / 3). That's why the next 100 rows never
got loaded.

In Swing, i used the
getValueAt(int rowIndex, int colIndex)
method of my table model. If rowIndex was big enough, i loaded the next
100 rows.
But in SWT, there isn't such a method. The label provider only gets the
data and the column index, but not the row.

Any idea how to solve this problem in SWT?
Thanks,

Ingo
Re: adding content to a table if user scrolls down [message #466206 is a reply to message #466191] Wed, 04 January 2006 20:10 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
Use the SWT.VIRTUAL style. It should get you pretty close to what you want.

http://publicobject.com/glazedlists/documentation/swt_virtua l_tables.html
Re: adding content to a table if user scrolls down [message #466265 is a reply to message #466206] Thu, 05 January 2006 16:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ingo.siebertNOSPAM.cas.de

It works awesome!
Thank you,

Ingo

Daniel Spiewak schrieb:
> Use the SWT.VIRTUAL style. It should get you pretty close to what you want.
>
> http://publicobject.com/glazedlists/documentation/swt_virtua l_tables.html
Re: adding content to a table if user scrolls down [message #466269 is a reply to message #466191] Thu, 05 January 2006 16:17 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
See:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet201.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup


"Ingo Siebert" <ingo.siebertNOSPAM@cas.de> wrote in message
news:dph5m7$q0s$1@utils.eclipse.org...
> Hi!
>
> Question:
> I load 100 rows from the DB and add them to the table.
> If the vertical ScrollBar of table has a value of
> (scrollBar.getMaximum() / 3)
> i want to load the next 100 rows and add them to the table.
>
>
>
> It got that working.
> But i tested it at a very big monitor and the 100 rows has been place
> nearly complete at the table, so the value of the scrollbar never reached
> (scrollBar.getMaximum() / 3). That's why the next 100 rows never got
> loaded.
>
> In Swing, i used the
> getValueAt(int rowIndex, int colIndex)
> method of my table model. If rowIndex was big enough, i loaded the next
> 100 rows.
> But in SWT, there isn't such a method. The label provider only gets the
> data and the column index, but not the row.
>
> Any idea how to solve this problem in SWT?
> Thanks,
>
> Ingo
Previous Topic:max value
Next Topic:Table Cell Colors For two Different Tables
Goto Forum:
  


Current Time: Fri Apr 19 09:37:50 GMT 2024

Powered by FUDForum. Page generated in 0.01809 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top