Ext.define("IceCap.ux.container.CommandPanel", {
	
	extend: "Ext.panel.Panel",

	alias: [
		"widget.COMMANDPANEL"
	],
    
    focusable: false,

    width:280,

    height:24,

    border: false,

    header: false,

 	initComponent: function() {

         var i_self = this;
         
         i_self.buttons = i_self.createButtons();

        i_self.callParent(arguments);

        i_self.add(i_self.createItems());
     },
     
     createItems: function() {

        var a_items = [];

        var i_store = Ext.create("Ext.data.Store", {
            autoLoad: true,
			fields: [
				"cmd",
				"description"
			],
			data:[
				{
					cmd: "wrksplf",
					description: "Work with spooled files"
				},
				{
					cmd: "wrksplf",
					description: "Work with spooled files"
				}
			]
        });

        var i_comboBox = Ext.widget("combobox", {
            store: i_store,
            displayField: "description",
            valueField: "cmd",
            width: 250,
            editable: false,
            selectOnFocus: true,
            emptyText: "Select a command and click OK..."
        });

        a_items.push(i_comboBox);

        return a_items;
     },

     createButtons: function() {

        var i_self = this;

        var a_buttons = [];

        var i_bntOK = Ext.widget("button", {
            text: "OK",
            handler: function() {
                debugger;
            }
        });

        a_buttons.push(i_bntOK);

        return a_buttons;
     }
});