DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Displaying multiple figures in one editpart
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Nov 2008
Default Displaying multiple figures in one editpart - 12-08-2008, 06:22 AM

Hi all,

I am new to GEF. I am trying to display multiple figures in one editpart. I created two figures. fig1 and fig2 and added them to one paretn figure fig.
Here is the code:

// Parent figure
Figure fig= new Figure();
// Child figures
Figure fig1= new Figure();
Rectangle rec1= new Rectanle(0, 100, 500, 30);
fig1.setBounds(rec1);
fig1. setOpaque(true);
Figure fig2= new Figure();
Rectangle rec2= new Rectanle(0, 200, 500, 30);
fig2.setBounds(rec2);
fig2. setOpaque(true);
// Adding the child figures to parent figure
fig.add(fig1);
fig.add(fig2);

and then returning only the parent figure. When I am printing the children of the parent figure then I am getting the two child but on the graphical editor its displaying only on bar. Can somebody please tell where I am doing mistake.

Is it possible to draw mutiple figures within one editpart?

Thanks

with regards,

Ritu
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to display three different editparts figures on one root Editpart layer swapna.vadake Eclipse 0 11-25-2008 06:13 AM
How to call the editPart or editPartFactory in selectionchanged method ritututeja9 Eclipse 0 11-19-2008 04:37 AM
Multiple display at project exproler kenasato Eclipse 0 10-27-2008 11:14 AM
Multiple selection in TableViewer jayjamba Eclipse 6 07-22-2008 04:16 AM
Displaying unicode characters in org.eclipse.swt.widgets.Table widget digital2k8 Eclipse 0 03-05-2008 09:11 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com