|
Re: How to stop resizing? [message #211219 is a reply to message #211179] |
Thu, 09 March 2006 01:30 |
Eclipse User |
|
|
|
Originally posted by: uniera.gmail.com
I think you should install a NonResizableEditPolicy to the editpart with
key=EditPolicy.LAYOUT_ROLE.
Martin Holmes wrote:
> Hi all
> Anyone know how to stop resizing.
>
> I have stopped the element resizing by not including
> RequestConstants.REQ_RESIZE in the command
>
> public boolean canExecute() {
> Object type = request.getType();
> return (RequestConstants.REQ_MOVE.equals(type)
> ||
> RequestConstants.REQ_MOVE_CHILDREN.equals(type));
> }
>
>
>
> However I still get the gray shaded box that indicates resize!
>
> thanks
>
> Martin
>
>
>
|
|
|
Re: How to stop resizing? [message #211236 is a reply to message #211219] |
Thu, 09 March 2006 02:09 |
Eclipse User |
|
|
|
Originally posted by: brandonchen.realtek.com.tw
Hi,
You can use setResizeDirections(...) to specify the direction to resize.
The below is from the logic exmaple..
protected EditPolicy createChildEditPolicy(EditPart child) {
if (child instanceof LEDEditPart || child instanceof OutputEditPart) {
ResizableEditPolicy policy = new LogicResizableEditPolicy();
policy.setResizeDirections(PositionConstants.EAST |
PositionConstants.WEST | PositionConstants.SOUTH |PositionConstants.NORTH);
return policy;
}
return new LogicResizableEditPolicy();
}
Brandon
"Uniera" <uniera@gmail.com> ??? news:duo0fb$4mj$1@utils.eclipse.org ???...
> I think you should install a NonResizableEditPolicy to the editpart with
> key=EditPolicy.LAYOUT_ROLE.
>
> Martin Holmes wrote:
> > Hi all
> > Anyone know how to stop resizing.
> >
> > I have stopped the element resizing by not including
> > RequestConstants.REQ_RESIZE in the command
> >
> > public boolean canExecute() {
> > Object type = request.getType();
> > return (RequestConstants.REQ_MOVE.equals(type)
> > ||
> > RequestConstants.REQ_MOVE_CHILDREN.equals(type));
> > }
> >
> >
> >
> > However I still get the gray shaded box that indicates resize!
> >
> > thanks
> >
> > Martin
> >
> >
> >
|
|
|
Re: How to stop resizing? [message #211293 is a reply to message #211179] |
Thu, 09 March 2006 09:07 |
Eclipse User |
|
|
|
Originally posted by: gmittendorferREMOVETHISTEXT.web.de
Martin Holmes wrote:
> Hi all
> Anyone know how to stop resizing.
>
> I have stopped the element resizing by not including
> RequestConstants.REQ_RESIZE in the command
>
> public boolean canExecute() {
> Object type = request.getType();
> return (RequestConstants.REQ_MOVE.equals(type)
> ||
> RequestConstants.REQ_MOVE_CHILDREN.equals(type));
> }
>
>
>
> However I still get the gray shaded box that indicates resize!
>
> thanks
>
> Martin
Hi,
if you don't want your child edit parts resizable you can override
createChildEditPolicy in the parents layout edit policy. By default it
returns a ResizableEditPolicy.
E.g.:
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
return new NonResizableEditPolicy();
}
Regards,
Georg
|
|
|
|
Powered by
FUDForum. Page generated in 0.01841 seconds