Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] Methods of BeanProxyAdapter

Hello VE Team,

1. In VE 1.0 we used to override the following methods of BeanProxyAdapter:

applied, cancelled, primInstantiateBeanProxy

Will overriding the same methods from BeanProxyAdapter of VE 1.1 have the
same effect?

If not which methods should be used in their place?

2. In VE 1.0 after using primInstantiateBeanProxy, getBeanProxy() returned
the newly instantiated proxy. Does this still hold?

3. What is the difference between primInstatiateDroppedPart and
primInstantiateThisPart? Should we be overriding these methods instead of
primInstantiateBeanProxy?

4. In VE 1.1.0.1 SDK, I am seeing a strange behavior,. When I drop JLabel on
the canvas, I see a black rectangle i.e. background, although 204,204,204 in
property sheet, is black on the canvas. Explicitly settin the background
color in property sheet is not reflected on the canvas.


5. In ComponentProxyAdapter.postInstantiateStuff, VE sets the newly created
beanProxy on componentManager and then adds to freeForm

In the case of ULC VE, I do the following:

			// Get the method proxy to obtain Swing object underlying a ULCWidget

			IProxyMethod getVisualProxyMethod = TargetVmHelper
					.getEnvironmentTypeProxy(getBeanProxyDomain())
					.getMethodProxy(
							expression,
							"getVisualComponent",
							new String[] { "com.ulcjava.base.application.ULCComponent" });

			// Obtain the proxy for Swing object underlying the ULCWidget

			ExpressionProxy visProxy = expression.createSimpleMethodInvoke(
					getVisualProxyMethod, TargetVmHelper
							.getEnvironmentTypeProxy(getBeanProxyDomain()),
					new IProxy[] { newbean }, true);

			// Set the swing object proxy on component manager

			getComponentManager().setComponentBeanProxy(visProxy, expression,
					getModelChangeController());

		// Get the method proxy for add to FreeForm dialog on VM

		IProxyMethod addMethod =
TargetVmHelper.getEnvironmentTypeProxy(getBeanProxyDomain()).getMethodProxy(
expression, "addToFreeForm",
				new String[] {"com.ulcjava.base.application.ULCComponent"} );

		// Add the object to free form

		expression.createSimpleMethodInvoke(addMethod,
				TargetVmHelper.getEnvironmentTypeProxy(getBeanProxyDomain()),
				new IProxy[] {newbean}, false);


As you can see, I am calling createSimpleMethodInvoke twice on the same
expression. Is this ok?

Thanks and regards,

Janak



Back to the top