Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Move parent through children(Move parent through children)
Move parent through children [message #1123418] Wed, 02 October 2013 10:44 Go to next message
Victor Lopez is currently offline Victor Lopez
Messages: 21
Registered: August 2013
Junior Member
Hello everyone,

I have one question that i do not know how to resolve.

I attached you my context.

One parent and invisible rectangle with 2 children rectangles at both sides.

The thing is that when i click on the parent (the invisible white part where the text is) i can move the whole of it. However, if i click and move at one of the other colored rectangles, just this rectangle is moved.

What i want is to make those 2 rectangles static (to cannot move them) and if you try to move them, is the parent the one who moves (like if you were clicking at it).

Any ideas?

Thanks in advance!

Victor.
  • Attachment: Example.png
    (Size: 6.69KB, Downloaded 47 times)
Re: Move parent through children [message #1125189 is a reply to message #1123418] Fri, 04 October 2013 04:51 Go to previous messageGo to next message
Fabio Messina is currently offline Fabio Messina
Messages: 9
Registered: July 2013
Junior Member
Victor Lopez wrote on Wed, 02 October 2013 10:44
What i want is to make those 2 rectangles static (to cannot move them) and if you try to move them, is the parent the one who moves (like if you were clicking at it).


I'm a newbie, but I can tell you that this is the default behaviour for shapes added with the parameter active set to false.
Try something like this:

		final Rectangle invisibleRectangle = gaService
				.createInvisibleRectangle(containerShape);
		...

		{
			final Shape shape = peCreateService.createShape(containerShape,
					false);
			final Rectangle rectangle = gaService.createPlainRectangle(shape);

                        ...

Re: Move parent through children [message #1125314 is a reply to message #1125189] Fri, 04 October 2013 07:41 Go to previous messageGo to next message
Victor Lopez is currently offline Victor Lopez
Messages: 21
Registered: August 2013
Junior Member
Thanks for the answer.

I know what you mean but the point is than inside the rectangles, i want to add some objects and if it is not active, i cannot select what is inside (if i am not wrong). =S
Re: Move parent through children [message #1125388 is a reply to message #1125314] Fri, 04 October 2013 09:05 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1527
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Victor,

if you put other active shapes inside the inactive ones, the inner active
shapes would be selectable. Just keep in mind that the inner shapes are
positioned reletive to the next outer active shape.

Michael
Previous Topic:opening Editor without resource file
Next Topic:Disabling Undo Issues
Goto Forum:
  


Current Time: Fri Apr 18 01:41:07 EDT 2014

Powered by FUDForum. Page generated in 0.25091 seconds