/** * Binds this model to some component with a {@link Binding} object. This method is called by * the various {@link WiringHarness} objects to bind individual components to this model. * * @param binding */ public void bind(Binding binding) { support.bind(binding); }
/** * Shortcut call for a generic model update. */ public void update() { this.modelUpdated(ModelUpdates.UNSPECIFIED); }
/** * Called by the implementing <code>Model</code> to notify all listeners * that data in the <code>Model</code> has changed. */ public void update() { support.update(); }
/** * {@inheritDoc} */ public void unbind(Binding binding) { support.unbind(binding); strongBindings.remove(binding); }
/** * Unbinds both weak and strong {@link Binding} from this Model. * @see BindableModel#unbind(Binding) */ public void unbindAll() { support.unbindAll(); strongBindings.clear(); }
/** * Binds this model to a {@link Binding} using strong references. * * @param binding */ public void bindStrongly(Binding binding) { support.bind(binding); strongBindings.add(binding); }
/** * {@inheritDoc} */ public <T extends Enum<T> & ModelUpdate> void modelUpdated(T... changed) { support.modelUpdated(changed); }