src/aria/widgets/AriaSkinNormalization.js
function (widgetName, skinClassName, skin, std) {
            // must return the normalizer for the frame state
            // get the frame type
            if (skin.frame == null) {
                skin.frame = {};
            }
            var skinFrame = skin.frame;
            std = std || {};
            var stdFrame = std.frame || {};
            var frameType;
            var defaultFrameType = "Simple";
            if (skin.simpleHTML) {
                frameType = "SimpleHTML";
            } else {
                var possibleValues = [skinFrame.frameType, stdFrame.frameType, defaultFrameType /* default */];
                for (var i = 0, l = possibleValues.length; i < l; i++) {
                    if (possibleValues[i] != null) {
                        frameType = possibleValues[i];
                        break;
                    }
                }
            }
            var frameNormalizers = this._getFrameNormalizers(widgetName, skinClassName, frameType);
            if (frameNormalizers == null) {
                // wrong frame type, use the default instead
                frameType = defaultFrameType;
                frameNormalizers = this._getFrameNormalizers(widgetName, skinClassName, frameType);
            }
            skinFrame.frameType = frameType;
            frameNormalizers.normFrameSkinClass(skin, std);
            if (Aria.debug) {
                var res = this._check(skinFrame, 'aria.widgets.AriaSkinBeans.' + frameType + 'FrameCfg');
                if (!res.result) {
                    this.$logWarn(this.FRAME_NORMALIZATION_ERROR, [widgetName, skinClassName,
                            res.message.replace(/\n/g, "\n ")]);
                }
            }
            return frameNormalizers.normFrameState;
        }
function (widgetName, skinClassName, skin, std) {
            // must return the normalizer for the frame state
            // get the frame type
            if (skin.frame == null) {
                skin.frame = {};
            }
            var skinFrame = skin.frame;
            std = std || {};
            var stdFrame = std.frame || {};
            var frameType;
            var defaultFrameType = "Simple";
            if (skin.simpleHTML) {
                frameType = "SimpleHTML";
            } else {
                var possibleValues = [skinFrame.frameType, stdFrame.frameType, defaultFrameType /* default */];
                for (var i = 0, l = possibleValues.length; i < l; i++) {
                    if (possibleValues[i] != null) {
                        frameType = possibleValues[i];
                        break;
                    }
                }
            }
            var frameNormalizers = this._getFrameNormalizers(widgetName, skinClassName, frameType);
            if (frameNormalizers == null) {
                // wrong frame type, use the default instead
                frameType = defaultFrameType;
                frameNormalizers = this._getFrameNormalizers(widgetName, skinClassName, frameType);
            }
            skinFrame.frameType = frameType;
            frameNormalizers.normFrameSkinClass(skin, std);
            if (Aria.debug) {
                var res = this._check(skinFrame, 'aria.widgets.AriaSkinBeans.' + frameType + 'FrameCfg');
                if (!res.result) {
                    this.$logWarn(this.FRAME_NORMALIZATION_ERROR, [widgetName, skinClassName,
                            res.message.replace(/\n/g, "\n ")]);
                }
            }
            return frameNormalizers.normFrameState;
        }
function ( widgetName , skinClassName , skin , std ) { // must return the normalizer for the frame state // get the frame type if ( skin . frame == null ) { skin . frame = { } ; } var skinFrame = skin . frame ; std = std || { } ; var stdFrame = std . frame || { } ; var frameType ; var defaultFrameType = "Simple" ; if ( skin . simpleHTML ) { frameType = "SimpleHTML" ; } else { var possibleValues = [ skinFrame . frameType , stdFrame . frameType , defaultFrameType /* default */ ] ; for ( var i = 0 , l = possibleValues . length ; i < l ; i ++ ) { if ( possibleValues [ i ] != null ) { frameType = possibleValues [ i ] ; break ; } } } var frameNormalizers = this . _getFrameNormalizers ( widgetName , skinClassName , frameType ) ; if ( frameNormalizers == null ) { // wrong frame type, use the default instead frameType = defaultFrameType ; frameNormalizers = this . _getFrameNormalizers ( widgetName , skinClassName , frameType ) ; } skinFrame . frameType = frameType ; frameNormalizers . normFrameSkinClass ( skin , std ) ; if ( Aria . debug ) { var res = this . _check ( skinFrame , 'aria.widgets.AriaSkinBeans.' + frameType + 'FrameCfg' ) ; if ( ! res . result ) { this . $logWarn ( this . FRAME_NORMALIZATION_ERROR , [ widgetName , skinClassName , res . message . replace ( / \n / g , "\n " ) ] ) ; } } return frameNormalizers . normFrameState ; }
Normalizes the frame properties for a skin class and returns the function which normalizes each frame state.
This method is called for skin classes of widgets which use a frame.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may not correspond exactly
to widgets)
@param {String} skinClassName skin class name
@param {Object} skin skin class to normalize
@param {Object} std std skin class
@return {Function}
Normalizes the frame properties for a skin class and returns the function which normalizes each frame state . This method is called for skin classes of widgets which use a frame .