Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » IFigure z-order
IFigure z-order [message #148925] Mon, 30 August 2004 11:00 Go to next message
Eclipse UserFriend
Originally posted by: tiagoneves.hotmail.com

I have the following code where panel is an IFigure as well as figure.
I implement the mousemotionlistener on each figure that i add to the panel.
I add several figures in different locations of the panel.

LightweightSystem lws = new LightweightSystem(canvas);
lws.setContents(panel);
panel.add(figure);


My problem is that when i dragg the figures to another point of the panel
the figure gets behind the figures added after this one has been added.
I want to get the figure i am dragging on top of all the figures.
How can i do that?
Any suggestion?

Thanks in advance.

Tiago Neves
Re: IFigure z-order [message #148965 is a reply to message #148925] Mon, 30 August 2004 14:51 Go to previous message
Eclipse UserFriend
Originally posted by: tiagoneves.hotmail.com

Dear Tiago Neves please do not ask any more questions that already been
answered.

For those who donŽt know how to solve this problem here is a solution.

z-order of Figures is based on their order in Figure.getChildren().

so in this particular case the figure in front is the last figure to be
added to panel.

to bring the selected figure to front tou just need to do:

panel.remove(figure);
panel.add(figure);

Thank you.

p.s:

is there any other way


Tiago Neves wrote:

> I have the following code where panel is an IFigure as well as figure.
> I implement the mousemotionlistener on each figure that i add to the panel.
> I add several figures in different locations of the panel.

> LightweightSystem lws = new LightweightSystem(canvas);
> lws.setContents(panel);
> panel.add(figure);


> My problem is that when i dragg the figures to another point of the panel
> the figure gets behind the figures added after this one has been added.
> I want to get the figure i am dragging on top of all the figures.
> How can i do that?
> Any suggestion?

> Thanks in advance.

> Tiago Neves
Previous Topic:activate an graphicaleditor with a contextMenu in Eclipse
Next Topic:which api can i use?
Goto Forum:
  


Current Time: Wed Apr 24 19:34:30 GMT 2024

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

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

Back to the top