Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Make shape not resizable
Make shape not resizable [message #213876] Tue, 11 April 2006 15:45 Go to next message
Eclipse UserFriend
Originally posted by: markp.softlanding.com

I have an editor that is based on the Shapes Example. I am using
RoundedRectangles in the diagram and I want to set the size in my code
and not allow the shape to be resized. I do want to allow it to be
moved.

Is there a "right way" to do this. I have forcibly done it in my code,
but when you click on shape you still have all of the resize handles.
Ideally, you would not.

Thanks

Mark
Re: Make shape not resizable [message #213914 is a reply to message #213876] Tue, 11 April 2006 19:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: micha.m2visio.de

You can define it the XYLayoutPolicy of shape's parent

protected EditPolicy createChildEditPolicy(EditPart child) {
return new NonResizableEditPolicy();
}

Michael

"Mark Phippard" <markp@softlanding.com> schrieb im Newsbeitrag
news:e1givd$b8r$1@utils.eclipse.org...
>I have an editor that is based on the Shapes Example. I am using
> RoundedRectangles in the diagram and I want to set the size in my code
> and not allow the shape to be resized. I do want to allow it to be
> moved.
>
> Is there a "right way" to do this. I have forcibly done it in my code,
> but when you click on shape you still have all of the resize handles.
> Ideally, you would not.
>
> Thanks
>
> Mark
Re: Make shape not resizable [message #213922 is a reply to message #213914] Tue, 11 April 2006 19:41 Go to previous message
Eclipse UserFriend
Originally posted by: markp.softlanding.com

Michael wrote:

> You can define it the XYLayoutPolicy of shape's parent
>
> protected EditPolicy createChildEditPolicy(EditPart child) {
> return new NonResizableEditPolicy();
> }

Thanks, that worked nicely!

Mark
Previous Topic:View not being drawn/shown/displayed
Next Topic:How to make my Actions are Editor Associated
Goto Forum:
  


Current Time: Wed Apr 24 23:10:21 GMT 2024

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

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

Back to the top