Package com.palantir.ptoss.cinch.core
Class WeakBindableModel
- java.lang.Object
- 
- com.palantir.ptoss.cinch.core.WeakBindableModel
 
- 
- All Implemented Interfaces:
- BindableModel
 
 public class WeakBindableModel extends java.lang.Object implements BindableModel Superclass for BindableModelinstances, this class handles the binding tasks for subclassed models.Basic theory of operation: TODO 
- 
- 
Constructor SummaryConstructors Constructor Description WeakBindableModel()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(Binding binding)Binds this model to some component with aBindingobject.voidbindStrongly(Binding binding)Binds this model to aBindingusing strong references.<T extends java.lang.Enum<T> & ModelUpdate>
 voidmodelUpdated(java.lang.Object oldValue, java.lang.Object newValue, T... changed)Fires a model update if the old and new values are different.<T extends java.lang.Enum<T> & ModelUpdate>
 voidmodelUpdated(T... changed)Alert the bindings that the model has updated with the specified change types.voidunbind(Binding binding)Removes the passed binding from this model.voidunbindAll()Unbinds both weak and strongBindingfrom this Model.voidupdate()Called by the implementingModelto notify all listeners that data in theModelhas changed.
 
- 
- 
- 
Method Detail- 
bindpublic void bind(Binding binding) Binds 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
 
 - 
bindStronglypublic void bindStrongly(Binding binding) Binds this model to aBindingusing strong references.
 - 
modelUpdatedpublic <T extends java.lang.Enum<T> & ModelUpdate> void modelUpdated(T... changed) Alert 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 java.lang.Enum<T> & ModelUpdate> void modelUpdated(java.lang.Object oldValue, java.lang.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.
 - 
unbindpublic void unbind(Binding binding) Removes the passed binding from this model.- Specified by:
- unbindin interface- BindableModel
 
 - 
unbindAllpublic void unbindAll() Unbinds both weak and strongBindingfrom this Model.- See Also:
- BindableModel.unbind(Binding)
 
 
- 
 
-