How to limit edit part size for resizing? [message #47856] |
Thu, 05 December 2002 14:48  |
Eclipse User |
|
|
|
Hi,
I\'d like to be able to limit the resize of the edit part to its figure\'s
minimum size. I\'d also like the resize feedback not to get any smaller
than that. What\'s the best way to do this? I tried returning null command
from createChangeConstraintCommand but that only solves half the problem.
Without the feedback limit, its impossible to the user to know how far
they can resize it.
I think I can do what I need by specializing ResizeTracker to know
mimimumSize and (then ignore deltas that make it smaller than that) and
also specializing the ResizableEditPolicy to create the handles with the
new Tracker. Is this the right aproach? Seems too much work for something
that looks to me like a generally useful feature.
Thanks,
-Vadim
|
|
|
|
Re: How to limit edit part size for resizing? [message #48038 is a reply to message #47978] |
Thu, 05 December 2002 16:16  |
Eclipse User |
|
|
|
Thank you! I guess I wasn't looking in the right place. It still doesn't
actually limit the feedback, which would be cool, but it does work well
and resizes to minimum if user went below that. It will do just fine.
Thanks again.
-Vadim
Randy Hudson wrote:
> See XYLayoutEditPolicy.getMinimumSizeFor(GraphicalEditPart child).
> Override this method in your XYLayoutEditPolicy subclass.
> "Vadim Strizhevsky" <Vadim.Strizhevsky@morganstanley.com> wrote in message
> news:asoai0$6rm$1@rogue.oti.com...
> > Hi,
> >
> > I\'d like to be able to limit the resize of the edit part to its figure\'s
> > minimum size. I\'d also like the resize feedback not to get any smaller
> > than that. What\'s the best way to do this? I tried returning null command
> > from createChangeConstraintCommand but that only solves half the problem.
> > Without the feedback limit, its impossible to the user to know how far
> > they can resize it.
> >
> > I think I can do what I need by specializing ResizeTracker to know
> > mimimumSize and (then ignore deltas that make it smaller than that) and
> > also specializing the ResizableEditPolicy to create the handles with the
> > new Tracker. Is this the right aproach? Seems too much work for something
> > that looks to me like a generally useful feature.
> >
> > Thanks,
> > -Vadim
> >
|
|
|
Powered by
FUDForum. Page generated in 0.27960 seconds