Skip to content

Commit

Permalink
refactor remove OldFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-g committed Mar 21, 2013
1 parent 39ec3fe commit b224cb8
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 445 deletions.
114 changes: 0 additions & 114 deletions src/aria/widgets/AriaSkinBeans.js
Expand Up @@ -237,12 +237,6 @@ Aria.beanDefinitions({
$type : "TableFrameStateCfg" $type : "TableFrameStateCfg"
}, { }, {
$type : "SimpleHTMLFrameStateCfg" $type : "SimpleHTMLFrameStateCfg"
}, {
$type : "Old0FrameStateCfg"
}, {
$type : "Old1FrameStateCfg"
}, {
$type : "Old2FrameStateCfg"
}] }]
} }
}, },
Expand Down Expand Up @@ -279,12 +273,6 @@ Aria.beanDefinitions({
$type : "TableFrameCfg" $type : "TableFrameCfg"
}, { }, {
$type : "SimpleHTMLFrameCfg" $type : "SimpleHTMLFrameCfg"
}, {
$type : "Old0FrameCfg"
}, {
$type : "Old1FrameCfg"
}, {
$type : "Old2FrameCfg"
}] }]
}, },
"ButtonCfg" : { "ButtonCfg" : {
Expand Down Expand Up @@ -1479,108 +1467,6 @@ Aria.beanDefinitions({
} }
} }
}, },
"OldFrame" : {
$type : "Object",
$description : "",
$properties : {
spriteURL : {
$type : "json:String",
$description : ""
},
spcLeft : {
$type : "Pixels"
},
spcRight : {
$type : "Pixels"
},
spcTop : {
$type : "Pixels"
},
spcBottom : {
$type : "Pixels"
},
sprWidth : {
$type : "Pixels"
},
sprHeight : {
$type : "Pixels"
},
offsetLeft : {
$type : "Pixels"
}
}
},
"Old0FrameCfg" : {
$type : "OldFrame",
$description : "Deprecated, please use farmes of types \"FixedHeight\", \"Simple\", \"Table\", \"SimpleHTML\" instead. Frame properties have to be specified state-wise.",
$properties : {
"sprType" : {
$type : "json:Integer",
$description : "Deprecated, please use frameType instead. The value corresponding to this type of frame is 0."
},
"frameType" : {
$type : "json:Enum",
$enumValues : ["Old0"],
$description : "The value that indicates that no frame is desired is \"Old0\"."
}
}
},
"Old1FrameCfg" : {
$type : "OldFrame",
$description : "Deprecated, please use farmes of types \"FixedHeight\", \"Simple\", \"Table\", \"SimpleHTML\" instead. Frame properties have to be specified state-wise.",
$properties : {
"sprType" : {
$type : "json:Integer",
$description : "Deprecated, please use frameType instead. The value corresponding to this type of frame is 1."
},
"frameType" : {
$type : "json:Enum",
$enumValues : ["Old1"],
$description : "The value that indicates that no frame is desired is \"Old1\"."
}
}
},
"Old2FrameCfg" : {
$type : "OldFrame",
$description : "Deprecated, please use farmes of types \"FixedHeight\", \"Simple\", \"Table\", \"SimpleHTML\" instead. Frame properties have to be specified state-wise.",
$properties : {
"sprType" : {
$type : "json:Integer",
$description : "Deprecated, please use frameType instead. The value corresponding to this type of frame is 2."
},
"frameType" : {
$type : "json:Enum",
$enumValues : ["Old2"],
$description : "The value that indicates that no frame is desired is \"Old2\"."
}
}
},
"OldFrameState" : {
$type : "Object",
$description : "Deprecated properties of a frames of old types for this state.",
$properties : {
"sprIdx" : {
$type : "json:Integer",
$description : ""
},
"textAlign" : {
$type : "json:String",
$description : ""
},
"color" : {
$type : "Color"
}
}
},
"Old0FrameStateCfg" : {
$type : "OldFrameState"
},
"Old1FrameStateCfg" : {
$type : "OldFrameState"
},
"Old2FrameStateCfg" : {
$type : "OldFrameState"
},
"SimpleHTMLFrameCfg" : { "SimpleHTMLFrameCfg" : {
$type : "Object", $type : "Object",
$description : "Used for widgets which have no frame at all. No frame properties have to be specified state-wise.", $description : "Used for widgets which have no frame at all. No frame properties have to be specified state-wise.",
Expand Down
15 changes: 5 additions & 10 deletions src/aria/widgets/AriaSkinNormalization.js
Expand Up @@ -61,20 +61,18 @@ Aria.classDefinition({
FRAME_NORMALIZATION_ERROR : "Error while normalizing the frame part of widget %1, skin class %2:\n %3", FRAME_NORMALIZATION_ERROR : "Error while normalizing the frame part of widget %1, skin class %2:\n %3",
FRAME_STATE_NORMALIZATION_ERROR : "Error while normalizing the frame part of widget %1, skin class %2, state %3:\n %4", FRAME_STATE_NORMALIZATION_ERROR : "Error while normalizing the frame part of widget %1, skin class %2, state %3:\n %4",
WIDGET_NORMALIZATION_ERROR : "Error while normalizing widget %1:\n %2", WIDGET_NORMALIZATION_ERROR : "Error while normalizing widget %1:\n %2",
GENERAL_NORMALIZATION_ERROR : "Error while normalizing general skin properties:\n %1", GENERAL_NORMALIZATION_ERROR : "Error while normalizing general skin properties:\n %1"

DEPRECATED_FRAME_TYPE : "The frame type %1, used in widget %2, skin class %3, is deprecated. Please use either Table, FixedHeight, SimpleHTML or Simple."
}, },
$prototype : { $prototype : {
/** /**
* Available frame types. It is used to convert the integer sprite type (index in this array) into the * Available frame types. It is used to convert the integer sprite type (index in this array) into the
* corresponding string. * corresponding string.
* @type Array * @type Array
*/ */
_frameTypes : [ _frameTypes : [ // 0,1,2 corresponded to old frames which were removed as of AT 1.4.1
/* 0 */"Old0", /* 0 */"",
/* 1 */"Old1", /* 1 */"",
/* 2 */"Old2", /* 2 */"",
/* 3 */"Table", /* 3 */"Table",
/* 4 */"FixedHeight", /* 4 */"FixedHeight",
/* 5 */"SimpleHTML", /* 5 */"SimpleHTML",
Expand Down Expand Up @@ -155,9 +153,6 @@ Aria.classDefinition({
skinFrame.frameType = frameType; skinFrame.frameType = frameType;
frameNormalizers.normFrameSkinClass(skin, std); frameNormalizers.normFrameSkinClass(skin, std);
if (Aria.debug) { if (Aria.debug) {
if (/^Old/.test(frameType)) {
this.$logWarn(this.DEPRECATED_FRAME_TYPE, [frameType, widgetName, skinClassName]);
}
var res = this._check(skinFrame, 'aria.widgets.AriaSkinBeans.' + frameType + 'FrameCfg'); var res = this._check(skinFrame, 'aria.widgets.AriaSkinBeans.' + frameType + 'FrameCfg');
if (!res.result) { if (!res.result) {
this.$logWarn(this.FRAME_NORMALIZATION_ERROR, [widgetName, skinClassName, this.$logWarn(this.FRAME_NORMALIZATION_ERROR, [widgetName, skinClassName,
Expand Down
3 changes: 1 addition & 2 deletions src/aria/widgets/action/Button.js
Expand Up @@ -95,7 +95,6 @@ Aria.classDefinition({
state : this._state, state : this._state,
sclass : cfg.sclass, sclass : cfg.sclass,
skinnableClass : this._skinnableClass, skinnableClass : this._skinnableClass,
"oldStuff:cssRoot" : "BTN",
// added in PTR 05170822 to avoid the internal scrollbard for content // added in PTR 05170822 to avoid the internal scrollbard for content
scrollBarX : false, scrollBarX : false,
scrollBarY : false scrollBarY : false
Expand Down Expand Up @@ -359,4 +358,4 @@ Aria.classDefinition({
return true; return true;
} }
} }
}); });
1 change: 0 additions & 1 deletion src/aria/widgets/container/Div.js
Expand Up @@ -40,7 +40,6 @@ Aria.classDefinition({
height : cfg.height, height : cfg.height,
printOptions : cfg.printOptions, printOptions : cfg.printOptions,
cssClass : cfg.cssClass, cssClass : cfg.cssClass,
"oldStuff:cssRoot" : "DIV",
block : cfg.block, block : cfg.block,
scrollBarX : cfg.scrollBarX, scrollBarX : cfg.scrollBarX,
scrollBarY : cfg.scrollBarY scrollBarY : cfg.scrollBarY
Expand Down
3 changes: 1 addition & 2 deletions src/aria/widgets/form/InputWithFrame.js
Expand Up @@ -72,7 +72,6 @@ Aria.classDefinition({
skinnableClass : this._skinnableClass, skinnableClass : this._skinnableClass,
width : this._inputMarkupWidth, width : this._inputMarkupWidth,
state : this._state, state : this._state,
"oldStuff:cssRoot" : "TIN",
scrollBarX : false, scrollBarX : false,
scrollBarY : false, scrollBarY : false,
tooltipLabels : [cfg.iconTooltip], tooltipLabels : [cfg.iconTooltip],
Expand Down Expand Up @@ -126,4 +125,4 @@ Aria.classDefinition({
this._frame.changeState(this._state); this._frame.changeState(this._state);
} }
} }
}); });
9 changes: 3 additions & 6 deletions src/aria/widgets/frames/FrameFactory.js
Expand Up @@ -20,15 +20,12 @@
Aria.classDefinition({ Aria.classDefinition({
$classpath : 'aria.widgets.frames.FrameFactory', $classpath : 'aria.widgets.frames.FrameFactory',
$singleton : true, $singleton : true,
$dependencies : ["aria.widgets.AriaSkinInterface", "aria.widgets.frames.CfgBeans", "aria.widgets.frames.OldFrame", $dependencies : ["aria.widgets.AriaSkinInterface", "aria.widgets.frames.CfgBeans",
"aria.widgets.frames.SimpleFrame", "aria.widgets.frames.TableFrame", "aria.widgets.frames.SimpleFrame", "aria.widgets.frames.TableFrame",
"aria.widgets.frames.FixedHeightFrame", "aria.widgets.frames.SimpleHTMLFrame"], "aria.widgets.frames.FixedHeightFrame", "aria.widgets.frames.SimpleHTMLFrame"],
$constructor : function () { $constructor : function () {
/* The keys in the following map are associated with the STATIC sprite types */ /* The keys in the following map are associated with the STATIC sprite types */
this._frameTypeBuilders = { this._frameTypeBuilders = {
"Old0" : aria.widgets.frames.OldFrame,
"Old1" : aria.widgets.frames.OldFrame,
"Old2" : aria.widgets.frames.OldFrame,
"Table" : aria.widgets.frames.TableFrame, "Table" : aria.widgets.frames.TableFrame,
"FixedHeight" : aria.widgets.frames.FixedHeightFrame, "FixedHeight" : aria.widgets.frames.FixedHeightFrame,
"SimpleHTML" : aria.widgets.frames.SimpleHTMLFrame, "SimpleHTML" : aria.widgets.frames.SimpleHTMLFrame,
Expand Down Expand Up @@ -79,8 +76,8 @@ Aria.classDefinition({
}, },


/** /**
* Create a new frame according to the given configuration object. The type of frame returned (either OldFrame, * Create a new frame according to the given configuration object. The type of frame returned (either TableFrame
* TableFrame or FixedHeightFrame) depends on the frame.frameType property of the skin class. * or FixedHeightFrame) depends on the frame.frameType property of the skin class.
* @param {aria.widgets.frames.CfgBeans.FrameCfg} cfg Frame configuration * @param {aria.widgets.frames.CfgBeans.FrameCfg} cfg Frame configuration
* @return {aria.widgets.frames.Frame} A frame object, or null if an error occured (in this case, the error is * @return {aria.widgets.frames.Frame} A frame object, or null if an error occured (in this case, the error is
* logged). * logged).
Expand Down
10 changes: 5 additions & 5 deletions src/aria/widgets/frames/FrameWithIcons.js
Expand Up @@ -110,10 +110,10 @@ Aria.classDefinition({
}, },
$statics : { $statics : {
/** /**
* Create a new frame according to the given configuration object. The type of frame used (either OldFrame, * Create a new frame according to the given configuration object. The type of frame used (either TableFrame or
* TableFrame or FixedHeightFrame) depends on the frame.frameType property of the skin class. If the skin defines icons * FixedHeightFrame) depends on the frame.frameType property of the skin class. If the skin defines icons around
* around the frame, the frame returned is wrapped in a FrameWithIcons object, otherwise there is no * the frame, the frame returned is wrapped in a FrameWithIcons object, otherwise there is no FrameWithIcons
* FrameWithIcons object. * object.
* @param {aria.widgets.frames.CfgBeans.FrameCfg} cfg Frame configuration * @param {aria.widgets.frames.CfgBeans.FrameCfg} cfg Frame configuration
* @return {aria.widgets.frames.Frame} A frame object, or null if an error occured (in this case, the error is * @return {aria.widgets.frames.Frame} A frame object, or null if an error occured (in this case, the error is
* logged). * logged).
Expand Down Expand Up @@ -456,4 +456,4 @@ Aria.classDefinition({
} }


} }
}); });

0 comments on commit b224cb8

Please sign in to comment.