Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
  public class CompositeBehavior implements IBehavior, IHeaderContributor {
	
	private List<IBehavior> _behaviors; 
	
	public CompositeBehavior() { 
		_behaviors = new ArrayList<IBehavior>();
	}

        ....

        public void bind(Component aComponent) {
                for (IBehavior behavior: createLocalizedBehaviors(aComponent) ) {
                        behavior.bind(aComponent);
                        add(behavior);
                }
        }

        /**
         * Callback to create further localized componentsbehaviors.
         * @return Array of behaviors. The bind() method is called on each behavior
         *   returned from this method.
         */
        protected abstract IBehavior[] createLocalizedBehaviors(Component aComponent);

        ....
} 

...