Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Extending NatTable (When I am extending NatTable, it is coming with deafult NatTable. How to avoid the default NatTable from being added?)
Extending NatTable [message #1463295] Thu, 06 November 2014 12:17 Go to next message
Pavan Dhande is currently offline Pavan DhandeFriend
Messages: 5
Registered: September 2014
Junior Member
I am calling NatTable from the dialog as below:
MyNatTable natTable = new MyNatTable(composite);

MyNatTable extends from NatTable as below:
public class FV9VSCSECUVarNatTable extends org.eclipse.nebula.widgets.nattable.NatTable

I am using the class constuctor as below:
public MyNatTable(Composite parent)
{
super(parent,true);
}


In this case I am getting composite with default NatTable (please check in the attached screenshot). When I am trying to add my contents it is coming below this default NatTable.

How to avoid this default NatTable from being added to composite?

Re: Extending NatTable [message #1463373 is a reply to message #1463295] Thu, 06 November 2014 14:01 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Moving this to the NatTable forum group.
Re: Extending NatTable [message #1463424 is a reply to message #1463373] Thu, 06 November 2014 14:52 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
If you extend NatTable you should check which constructors you need to implement accordingly. It seems you only implemented the constructor that creates the default NatTable stuff.

Although I completely don't understand why you are extending NatTable instead of using and configuring it.
Re: Extending NatTable [message #1464283 is a reply to message #1463424] Fri, 07 November 2014 11:36 Go to previous messageGo to next message
Pavan Dhande is currently offline Pavan DhandeFriend
Messages: 5
Registered: September 2014
Junior Member
Hi Dirk,
Actually I need to create TabFolder that will have different tabs as per requirement. In each tab I need to show Nattable with different eventlist. The table columns will be same however data will be different as it will be fetched from different objects.
In short I need to create multiple NatTable runtime and add it in different tab. The number of Tab and NatTable will very depending upon condition.
I was trying to separate out NatTable creation so that I can add it under different tab.

What do you think is the better way?
Re: Extending NatTable [message #1464300 is a reply to message #1464283] Fri, 07 November 2014 12:00 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
create a new NatTable instance on the tab. If you want to abstract things out, implement a custom pre-configured layer. But it doesn't make sense to extend NatTable
Previous Topic:How to use Nattable as a tree viewer?
Next Topic:Hiding all columns without a rowheader
Goto Forum:
  


Current Time: Fri Apr 26 12:40:14 GMT 2024

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

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

Back to the top