
Application = Core.extend(Echo.Application, {
    
    $construct : function() {
        Echo.Application.call(this);

        var client = new Echo.FreeClient(this, document.getElementById('demo'));
        client.init();

        var contentPane = new ActiveTextAreaDemo();
        this.rootComponent.add(contentPane);
    }
});


/**
 *  Create a 'Demo' class
 */

ActiveTextAreaDemo = Core.extend(Echo.Column, {
    
    $construct : function() {
            
        Echo.Column.call(this, {
        
            insets : '10px 10px 0px 10px',
            cellSpacing : '20px',
            
            children : [

                new Informagen.ActiveTextArea({
                    height: '20ex',
                    width:  '300px'
                }), 
            
                new Informagen.ActiveTextArea({
                
                    text : 'What demo is complete without "Hello, world!"\n\nHello, world!',
                    overdraft: 65,
                    
                    height: '20ex',
                    width:  '300px',
                    
                    background : '#ffffff',
                    foreground : '#000000',

                    font : {
                        typeface : ['sans-serif', 'Lucida Grande', 'Arial', 'Verdana'],
                        size : 10,
                        bold : false,
                        italic : false,
                        underline : false
                    }
                }), 
                
                new Informagen.ActiveTextArea({
                
                    text : 'This is another ActiveTextArea which should behave independently from the one above.',
                    overdraft: 100,
                    
                    height: '20ex',
                    width:  '300px',
                    
                    background : '#ffffff',
                    foreground : '#000000',
                    
                    overdraftForegroundColor: '#ff0000',
                    overdraftBackgroundColor: '#ffff99',

                    font : {
                        typeface : ['sans-serif', 'Lucida Grande', 'Arial', 'Verdana'],
                        size : 10,
                        bold : false,
                        italic : false,
                        underline : false
                    }
                })
                
            ]
        })
    }
});

