Package com.palantir.ptoss.cinch.core
Class WeakBindableModel
java.lang.Object
com.palantir.ptoss.cinch.core.WeakBindableModel
- All Implemented Interfaces:
- BindableModel
 Superclass for BindableModel instances, this class handles the binding
 tasks for subclassed models.
 
Basic theory of operation: TODO
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidBinds this model to some component with aBindingobject.voidbindStrongly(Binding binding) Binds this model to aBindingusing strong references.<T extends Enum<T> & ModelUpdate>
 voidmodelUpdated(Object oldValue, Object newValue, T... changed) Fires a model update if the old and new values are different.<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.voidUnbinds both weak and strongBindingfrom this Model.voidupdate()Called by the implementingModelto notify all listeners that data in theModelhas changed.
- 
Constructor Details- 
WeakBindableModelpublic WeakBindableModel()
 
- 
- 
Method Details- 
bindBinds this model to some component with aBindingobject. This method is called by the variousWiringHarnessobjects to bind individual components to this model.- Specified by:
- bindin interface- BindableModel
 
- 
bindStronglyBinds this model to aBindingusing strong references.
- 
modelUpdatedAlert the bindings that the model has updated with the specified change types.- Specified by:
- modelUpdatedin interface- BindableModel
- Parameters:
- changed- list of change types to indicate
 
- 
modelUpdatedpublic <T extends Enum<T> & ModelUpdate> void modelUpdated(Object oldValue, Object newValue, T... changed) Fires a model update if the old and new values are different.- Type Parameters:
- T- A varargs list of enumerated- ModelUpdatetypes.
- Parameters:
- oldValue- original value to be compared
- newValue- new value to compare against
 
- 
updatepublic void update()Called by the implementingModelto notify all listeners that data in theModelhas changed.
- 
unbindRemoves the passed binding from this model.- Specified by:
- unbindin interface- BindableModel
 
- 
unbindAllpublic void unbindAll()Unbinds both weak and strongBindingfrom this Model.- See Also:
 
 
-