public class WeakBindableModel extends java.lang.Object implements BindableModel
Superclass for BindableModel instances, this class handles the binding
tasks for subclassed models.
Basic theory of operation: TODO
| Constructor and Description |
|---|
WeakBindableModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Binding binding)
Binds this model to some component with a
Binding object. |
void |
bindStrongly(Binding binding)
Binds this model to a
Binding using strong references. |
<T extends java.lang.Enum<T> & ModelUpdate> |
modelUpdated(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> |
modelUpdated(T... changed)
Alert the bindings that the model has updated with the specified change types.
|
void |
unbind(Binding binding)
Removes the passed binding from this model.
|
void |
unbindAll()
Unbinds both weak and strong
Binding from this Model. |
void |
update()
Called by the implementing
Model to notify all listeners
that data in the Model has changed. |
public void bind(Binding binding)
Binding object. This method is called by
the various WiringHarness objects to bind individual components to this model.bind in interface BindableModelpublic void bindStrongly(Binding binding)
Binding using strong references.public <T extends java.lang.Enum<T> & ModelUpdate> void modelUpdated(T... changed)
modelUpdated in interface BindableModelchanged - list of change types to indicatepublic <T extends java.lang.Enum<T> & ModelUpdate> void modelUpdated(java.lang.Object oldValue, java.lang.Object newValue, T... changed)
T - A varargs list of enumerated ModelUpdate types.oldValue - original value to be comparednewValue - new value to compare againstpublic void update()
Model to notify all listeners
that data in the Model has changed.public void unbind(Binding binding)
unbind in interface BindableModelpublic void unbindAll()
Binding from this Model.BindableModel.unbind(Binding)