Package com.palantir.ptoss.cinch.core
Class DefaultBindableModel
java.lang.Object
com.palantir.ptoss.cinch.core.DefaultBindableModel
- All Implemented Interfaces:
BindableModel,Serializable
- Direct Known Subclasses:
AbstractScheduleModel,EditingModel,HolidayModel,PasswordEditor.PasswordModel,RosterModel,ScheduleAdjustment,ScheduleModel,UserModel
Default implementation of
BindableModel - should be subclassed by implementations.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAttach the binding to the model.<T extends Enum<T> & ModelUpdate>
voidmodelUpdated(T... changed) Alert the bindings that the model has updated with the specified change types.voidRemoves the passed binding from this model.voidRemoves all bindings from this model.voidupdate()Performs a model update of typeModelUpdates.UNSPECIFIED- convenience method for most models.
-
Constructor Details
-
DefaultBindableModel
public DefaultBindableModel()
-
-
Method Details
-
bind
Attach the binding to the model. Whenever the model is updated then the binding will be triggered.- Specified by:
bindin interfaceBindableModel
-
unbind
Removes the passed binding from this model.- Specified by:
unbindin interfaceBindableModel
-
unbindAll
public void unbindAll()Removes all bindings from this model. -
modelUpdated
Alert the bindings that the model has updated with the specified change types.- Specified by:
modelUpdatedin interfaceBindableModel- Parameters:
changed- list of change types to indicate
-
update
public void update()Performs a model update of typeModelUpdates.UNSPECIFIED- convenience method for most models.
-