Skip to main content



      Home
Home » Eclipse Projects » GEF » Layout policy with non-resizeable children
Layout policy with non-resizeable children [message #247566] Mon, 02 March 2009 13:51 Go to next message
Eclipse UserFriend
I am working on an application that is similar to the Shapes example, so I
have been basing my code on that. The child figures of my container
(corresponding to the Ellipse and Rectangle shapes in the example) can be
moved around the container, but I don't want them to be resizeable. When I
add the LayoutEditPolicy, it creates resize handles on the children when
they are selected. I can't work out where exactly it does that, and
whether I can tell it just to use drag handles.

I tried adding a NonResizeableEditPolicy to the child edit parts, but that
didn't help - in fact, when I did that, the ghost figure no longer
appeared when dragging the children. I then tried removing the
LayoutEditPolicy from the container. This gave me the drag handles and
ghost figure on the child again, but now the move command wouldn't work.
It always thought I was trying to do an orphan request, not a move,
because it couldn't find the target (i.e.
DragEditPartsTracker.targetEditPart was always null). What edit policy do
I need to put on the container so that it can be the target edit part?
Re: Layout policy with non-resizeable children [message #247581 is a reply to message #247566] Tue, 03 March 2009 13:20 Go to previous messageGo to next message
Eclipse UserFriend
Found it - my XYLayoutPolicy needed to override createChildEditPolicy() to
return a NonResizeableEditPolicy.
Re: Layout policy with non-resizeable children [message #247600 is a reply to message #247581] Wed, 04 March 2009 10:25 Go to previous message
Eclipse UserFriend
Originally posted by: bruno.pereira.alert.pt

Thanks,
I was looking for the same thing.

"Colin Sharples" <ctg@ctg.co.nz> wrote in message
news:50d786769ee2723c7f3b416a659e7018$1@www.eclipse.org...
> Found it - my XYLayoutPolicy needed to override createChildEditPolicy() to
> return a NonResizeableEditPolicy.
>
Previous Topic:FigureCanvas/Viewport size remains (0.0) when view is created
Next Topic:Questions about ConnectionAnchors
Goto Forum:
  


Current Time: Tue Apr 15 10:24:14 EDT 2025

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

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

Back to the top