The ViewInterface interface defines all the functionality
needed for a component to behave as a view in a model-view
connection. The com.sas.Component class implements the ViewInterface
by implementing ComponentInterface, which extends ViewInterface.
setModelInterface(ModelInterface model)
Calling setModelInterface will detach the previous model (if any) and
will call attachModel to attach the model to this view.
The get method for the requiredInterfaces attribute.
Retrieves the current value of the RequiredInterfaces atttribute.
This information contains an array for each required interface.
Returns:
interfaces - Array of interface information for each required interface
The set method for the requiredInterfaces attribute.
Sets the current value of the RequiredInterfaces attribute.
Parameters:
interfaces - Vector of interface information for each required interface
Each element in the vector contains the required interface name followed by attribute name
to method pairings for each attribute in the model which the view will set
up event handlers for. For example, this view requires
the StringListInterface and handles two attribute changed event
notifications from the model.
Attaches the specified model to this view.
Calls attachView on the model to notify it of the attach request.
Throws a run time ComponentException if the model denies the attach request.
Calls trapInterfaceEvents on the view to set up the appropriate
event handlers in the view for attribute changed events from the model.
attachModel will be called once for the model specified in the
setModel method. It is the responsibility of the views to maintain
interface handles to multiple models; one interface handle will be set in the
attachModel call and cleared in detachModel. Therefore, the interface handle
will always point to the last model attached to.
Throws a run time ComponentException if the specified model does not support the required
interface on the view.
Calls refresh, passing the model interface, on the view
after successful completion to allow the view
to update itself.
Detaches the specified model from this view.
Calls detachView on the model to notify it of the attach request.
Calls removeInterfaceTraps on the view to remove the appropriate
event handlers in the view for attribute changed events from the model.
Calls refresh, passing null for the model interface, on the view
after successful completion to allow the view
to clear itself.
Updates the view based on updates in the model.
Called by attachModel upon a successful attach to give the view
a chance to update itself.
Views should override this method to perform whatever updates
are necessary after a model update.
Calling setModelInterface will detach the previous model (if any) and
will call attachModel to attach the model to this view.
Sends a propertyChange event for the model property