Skip to main content



      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
Eclipse UserFriend
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 185 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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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:Faster way of removing graphiti elements
Next Topic:Disabling Undo Issues
Goto Forum:
  


Current Time: Sat Jul 12 18:27:40 EDT 2025

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

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

Back to the top