Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Creating A Table From Linked-objects
Creating A Table From Linked-objects [message #473915] Wed, 05 August 2009 20:35
Kap Pak is currently offline Kap PakFriend
Messages: 52
Registered: July 2009
Hello Guys,

I have the following model which makes an element a parent of the element
that follows it. For example i get data from a server in an array of
arrays like this:

net Person age
net Person height

net Address streetname

org Company name

org Company location

com School color

com School number

please kindly read the link below for the message yesterday i posted and
see the model classes and the structure. The question i asked in this link
is not what i want now. I just want you to see the data model and the
structure. objects


I want to create a table from the model but am finding it difficult to
implement the Content and Label providers. So am asking how i can do it.
Each column will contain the children of the previous column and etc..

Thanks for your help.

I tried this in the content provider but its not working:

public Object[] getElements(Object parentElement) {

if(parentElement instanceof cPackage) {
cPackage pack = (cPackage)parentElement;
return pack.getChildren().toArray();
}else if(parentElement instanceof cClass) {
cClass klas = (cClass)parentElement;
return klas.getChildren().toArray();
}else if(parentElement instanceof cMethod) {
cMethod met = (cMethod)parentElement;
return met.getChildren().toArray();
Previous Topic:Deploying for both 32-bit and 64-bit JVM
Next Topic:Close editor via button?
Goto Forum:

Current Time: Fri Dec 13 00:12:59 GMT 2019

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

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

Back to the top