Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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



Back to the top