public class PropertyDispatcher extends java.lang.Object { // Constructor public PropertyDispatcher(Behavior a); // Methods public void detach(); public Behavior getBvr(); public Behavior notify(int, boolean, double, double, Behavior, Behavior); public void setControl(Object object); public void setPropertyName(String name); }
This class allows DirectAnimation behaviors to be attached to (and detached from) properties in ActiveX controls. For example, a NumberBvr can be attached to the width property of a frame on an HTML page.
Constructs a PropertyDispatcher object. This behavior is used only in the constructor. To attach a behavior to a property, first create the PropertyDispatcher class with that behavior, and then extract an equivalent behavior with getBvr(). Use this behavior in the model. When access to the control and its property name is available, call setControl() and setPropertyName(). Here is an example:
NumberBvr n = the behavior that will be attached to a control PropertyDispatcher pd = new PropertyDispatcher(n); NumberBvr attachedN = (NumberBvr)pd.getBvr(); //...At some other point pd.setControl(ctrl); pd.setPropertyName("width");
Note that the attachedN behavior must be running to affect the attached property. The behavior is running if:
public PropertyDispatcher(
Behavior a
);
Detaches an already attached behavior from an ActiveX control property.
public void detach( );
Returns a behavior that, while it is the same as the behavior used in the constructor, is updated over time. This is the behavior that should be used once the PropertyDispatcher object has been constructed.
public Behavior getBvr( );
Returns the Behavior object.
Sets the ActiveX control object to which a behavior will be attached.
public void setControl(
Object object
);
Sets the name of the ActiveX control property to which a DirectAnimation behavior will be attached.
public void setPropertyName(
String name
);
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.