@Override public void bind(Component aComponent) { for (IBehavior behavior : behaviors) { behavior.bind(aComponent); } }
@Override public void bind(Component aComponent) { super.bind(aComponent); for (IBehavior behavior: createLocalizedBehaviors(aComponent) ) { behavior.bind(aComponent); add(behavior); } }
behavior.bind(this);
/** * Adds an behavior modifier to the component. * * <p> * Note: this method is override to enable users to do things like discussed in <a * href="http://www.nabble.com/Why-add%28IBehavior%29-is-final--tf2598263.html#a7248198">this * thread</a>. * </p> * * @param behavior * The behavior modifier to be added * @return this (to allow method call chaining) */ public Component add(final IBehavior behavior) { if (behavior == null) { throw new IllegalArgumentException("Argument may not be null"); } addBehavior(behavior); if (!behavior.isTemporary()) { addStateChange(new AddedBehaviorChange(behavior)); } // Give handler the opportunity to bind this component behavior.bind(this); return this; }