Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » jface treeviewer with 2 columns
jface treeviewer with 2 columns [message #1015916] Mon, 04 March 2013 04:26 Go to next message
Mokhtar Abdu is currently offline Mokhtar Abdu
Messages: 104
Registered: November 2011
Senior Member
Hi,

is there a way to create a treeviewer with two columns? I know it is Yes but i mean here where both columns have same structure. Assume you have an object 'car' with some properties that change over time. you have this data as versions and want to fill a tree with it so that every column (along with its children) represents one time stamp. The intention here is to make kind of line-to-line comparison.
I couldn't adapt the classes implementing Contentprovider and StyledCellLabelProvider to get this done.

Thanks alot,
Mok
Re: jface treeviewer with 2 columns [message #1015941 is a reply to message #1015916] Mon, 04 March 2013 05:59 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 2013-03-04 10:26, Xtexter Mising name wrote:
> is there a way to create a treeviewer with two columns? I know it is Yes
> but i mean here where both columns have same structure. Assume you have
> an object 'car' with some properties that change over time. you have
> this data as versions and want to fill a tree with it so that every
> column (along with its children) represents one time stamp. The
> intention here is to make kind of line-to-line comparison.
> I couldn't adapt the classes implementing Contentprovider and
> StyledCellLabelProvider to get this done.

I don't understand the request. Have you added TreeViewerColumn's?

HTH & Greetings from Bremen,

Daniel Krügler
Re: jface treeviewer with 2 columns [message #1016092 is a reply to message #1015941] Mon, 04 March 2013 17:55 Go to previous message
Mokhtar Abdu is currently offline Mokhtar Abdu
Messages: 104
Registered: November 2011
Senior Member
Yes I added treeviewercolumns. Ok, consider this tutorial please
http://javawiki.sowas.com/doku.php?id=swt-jface:treetableviewer
The intetion in this demo is to have 3 columns (Land/Stadt, Person and Sex). Now I want to pass data of two (Städte in this case along with its persons,..etc) and display it in 6 columns (3 for first Stadt and 3 for second). Look at the picture plz.

Image:http://s14.directupload.net/file/d/3184/tqhq96br_jpg.htm

I couldn't adapt the methods
getElements(Object cities)
,
getChildren(Object parentElement)
to get this done.

Regards from Bonn,
Mok
Previous Topic:Databinding - AssertionFailedException on disposing TreeViewer: Getter called on disposed observable
Next Topic:[Databinding] Put data to a WritableMap from other Thread
Goto Forum:
  


Current Time: Fri Apr 25 03:01:01 EDT 2014

Powered by FUDForum. Page generated in 0.03728 seconds