Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] IContainmentHandler and IConstraintHandler


Hi Janek,

Sounds good.

Rich


"Janak Mulani" <janak.mulani@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

11/14/2006 12:11 PM

Please respond to
Discussions people developing code for the Visual Editor project        <ve-dev@xxxxxxxxxxx>

To
"Discussions people developing code for the Visual Editor project" <ve-dev@xxxxxxxxxxx>
cc
Subject
RE: [ve-dev] IContainmentHandler and IConstraintHandler





Hi Rich,

Thanks for the quick response.

>if you have your own version of
jfc.AbstractComponentModelContainmentHandler then you should take a look at
the jfc one to see what you need.

AbstractComponentModelContainmentHandler does not have much but it extends
ComponentModelAdapter which has all the contributeXXXCommand methods.

So I guess I should implement all those methods in my ModelAdapter class
(which also imlements IContainmentHandler).

Is that right?

Thanks and regards,

Janak

-----Original Message-----
From: ve-dev-bounces@xxxxxxxxxxx [mailto:ve-dev-bounces@xxxxxxxxxxx]On
Behalf Of Rich Kulp
Sent: Tuesday, November 14, 2006 10:18 PM
To: Discussions people developing code for the Visual Editor project
Subject: Re: [ve-dev] IContainmentHandler and IConstraintHandler



Hi,

On a drop there is no graphical edit part yet, it hasn't been dropped yet to
have a graphical editpart (size on drop happens BEFORE the part is actually
added to the model). Because of that there is no editpart to ask to get the
IConstraintHandler, so it must instead ask the model adapter which is based
upon the type of the child. The jfc.AbstractComponentModelContainmentHandler
already implements IConstraintHandler. If you have your own version of
jfc.AbstractComponentModelContainmentHandler then you should take a look at
the jfc one to see what you need.

Thanks,
Rich


"Janak Mulani" <janak.mulani@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx
11/14/2006 11:26 AM Please respond to
Discussions people developing code for the Visual Editor project
<ve-dev@xxxxxxxxxxx>

To"ve-Dev@Eclipse. Org" <ve-dev@xxxxxxxxxxx>
cc
Subject[ve-dev] IContainmentHandler and IConstraintHandler







Hi VE Team,

In VE 1.1:

1. I was defining creation policy in override file to set title on Frame,
text on button etc. on drop on the canvas.

2. For resize on drop, I  had a IConstraintHandler implementation in
ULCComponentGraphicalEditPart to contributSizeCommand() etc. The
getAdapter() method of ULCComponentGraphicalEditpart used to return that
object.

In VE 1.2:

I now define:

1. ULCVEContainmentHandler extends AbstractComponentModelContainmentHandler
which is specified in override as :

 modelAdapterClassname="com.canoo.ulc.visualeditor/com.canoo.ulc.visualedi
tor.propertysheet.ULCVEContainmentHandler"

  This class now sets title on Frame, text on button etc. on drop on the
canvas.

2. Now when I resize on drop, VE expects this class to
contributeSizeCommand(). My old IConstraintHandler in
ULCComponetGraphicalEditPart is not called any more.

Question:

1.Should I now implement all the methods of IConstrainHandler in
ULCVEContainmentHandler?

Basically the same class implements IContainmentHandler and
IConstraintHandler. Is this correct?

2. What should I now return in ULCComponentGraphicalEditPart.getAdapter()
for IConstraintHandler?

Thanks and regards,

Janak

_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev

_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top