|
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
|