Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » IDataProvider
IDataProvider [message #901986] Wed, 15 August 2012 08:06 Go to next message
Martin Jacob is currently offline Martin Jacob
Messages: 116
Registered: July 2009
Senior Member
Hi,

I implemented a data provider to provide the body data (BodyDataProvider). From this is derived the
class to provide the column header data (ColHeaderDataProvider). But it seams instead of calling the
methods of class ColHeaderDataProvider the methods from class BodyDataProvider are called.

how come his? Or did I miss some thing?

Martin
Re: IDataProvider [message #901989 is a reply to message #901986] Wed, 15 August 2012 08:15 Go to previous messageGo to next message
Martin Jacob is currently offline Martin Jacob
Messages: 116
Registered: July 2009
Senior Member
Hi,

found my mistake. I have to set the correct providers to the column and row header layer steck. By
mistake I used the BodyDataProvider.

this is correct
IDataProvider dataProvider = new BodyDataProvider();
IDataProvider colHeaderDataProvider = new ColHeaderDataProvider();
IDataProvider rowHeaderDataProvider = new RowHeaderDataProvider();
bodyLayer = new BodyLayerStack(dataProvider);
ColumnHeaderLayerStack columnHeaderLayer = new ColumnHeaderLayerStack(colHeaderDataProvider);
//before dataProvider instead of colHeaderDataProvider
RowHeaderLayerStack rowHeaderLayer = new RowHeaderLayerStack(rowHeaderDataProvider); //before
dataProvider instead of rowHeaderDataProvider

Martin



Martin Jacob wrote, On 15.08.2012 14:06:
> Hi,
>
> I implemented a data provider to provide the body data (BodyDataProvider). From this is derived the
> class to provide the column header data (ColHeaderDataProvider). But it seams instead of calling the
> methods of class ColHeaderDataProvider the methods from class BodyDataProvider are called.
>
> how come his? Or did I miss some thing?
>
> Martin
Re: IDataProvider [message #901990 is a reply to message #901986] Wed, 15 August 2012 08:19 Go to previous message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1208
Registered: July 2012
Senior Member
Hi,

without seeing the code that leads to your issue it is hard to help. How are your classes look like and how do you attach the data provider to the label stacks?

Greez,
Dirk
Previous Topic:Support for JFace TableViewer Providers
Next Topic:addColumnsIndexesToGroup
Goto Forum:
  


Current Time: Wed Jul 23 12:21:03 EDT 2014

Powered by FUDForum. Page generated in 0.03019 seconds