Added a setAttributes function for Composite