Ext.define('ProgressbarClass15', {
    extend: 'DisplayableAction',
    constructor: function(cfgXML, o, actionSequence){
        this.BarImage = null;
        this.Bar = null;
        this.callParent([ cfgXML, o, actionSequence]);
        this.BarImage = XmlHelper.getString(cfgXML, "barImage");
    },
    initializeDC: function(bg){
        this.initializeDisplayComponent(bg);
        //initialize the pictureBox first
        this.Bar = this.ContentContainer.createChild({
            tag: 'img',
            id: this.ObjectType + "-" + this.id + "-Bar",
            src: Author.resourcePath + this.BarImage,
            style: "position:absolute;left:0px;top;0px;height:" + this.ContentContainerHeight + "px;width:0px;"
        });
        this.ContentContainer.addListener("mousedown", this.onMouseDown, this);
    },
    onMouseDown: function(evt, el, o){
        evt.stopEvent();
    },
    setValue: function(value){
        var barWidth = this.ContentContainerWidth * value / 100;
        this.Bar.setStyle("width", barWidth + "px");
    },
    processAction: function(bg){
        if (this.IsChangeAction) {
            Author.DisplayManager.changeAction(this);
        }
        this.initializeDC(bg);
        this.setInitialVisibility();
        this.applyEffect();
        return {MoveOn: true, Interval: 0};
    }
});
