org.scopemvc.view.util
Interface ModelBindable

All Known Implementing Classes:
SAbstractListModel, SCheckBox, SLabel, SListSelectionModel, SModelAction, SModelButton, SPanel, SPasswordField, SRadioButton, SSlider, STextArea, STextField

public interface ModelBindable

Views that use an ActiveBoundModel delegate must implement this interface so that ActiveBoundModel can change the state of the View through this generic interface.

Version:
$Revision: 1.4 $ $Date: 2002/09/13 17:11:30 $
Author:
Steve Meyfroidt
See Also:
ActiveBoundModel

Method Summary
 java.lang.Object getViewValue()
          Get the current value (what would be set as a property of the bound model object) being presented on the View.
 void updateFromProperty(java.lang.Object inValue, boolean inReadOnly)
          Use the passed property value and read-only state to update the View.
 void validationFailed(java.lang.Exception inException)
          Validation failed while getting a value from View into the bound model object.
 void validationSuccess()
          Clear previous validation failure.
 

Method Detail

getViewValue

public java.lang.Object getViewValue()
                              throws java.lang.IllegalArgumentException
Get the current value (what would be set as a property of the bound model object) being presented on the View.

Returns:
property's value from the UI.
Throws:
java.lang.IllegalArgumentException - if conversion from the UI representation of the property to the typed value fails.

updateFromProperty

public void updateFromProperty(java.lang.Object inValue,
                               boolean inReadOnly)
Use the passed property value and read-only state to update the View.

Parameters:
inValue - The new value of the property in the bound model
inReadOnly - The new read-only state of the property

validationFailed

public void validationFailed(java.lang.Exception inException)
Validation failed while getting a value from View into the bound model object.
Use this to indicate to the user that the value being edited is invalid.

Parameters:
inException - The exception causing the validation failure

validationSuccess

public void validationSuccess()
Clear previous validation failure.

See Also:
validationFailed(java.lang.Exception)


Copyright © 2000-2002 The Scope Team. All Rights Reserved.