You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
800 B
37 lines
800 B
8 years ago
|
BI.BehaviorFactory = {
|
||
7 years ago
|
createBehavior: function (key, options) {
|
||
8 years ago
|
var behavior;
|
||
7 years ago
|
switch (key) {
|
||
8 years ago
|
case "highlight":
|
||
|
behavior = BI.HighlightBehavior;
|
||
|
break;
|
||
|
case "redmark":
|
||
|
behavior = BI.RedMarkBehavior;
|
||
|
break;
|
||
|
}
|
||
|
return new behavior(options);
|
||
|
}
|
||
7 years ago
|
};
|
||
8 years ago
|
|
||
|
/**
|
||
|
* guy
|
||
|
* 行为控件
|
||
|
* @class BI.Behavior
|
||
|
* @extends BI.OB
|
||
|
*/
|
||
|
BI.Behavior = BI.inherit(BI.OB, {
|
||
7 years ago
|
_defaultConfig: function () {
|
||
8 years ago
|
return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this, arguments), {
|
||
7 years ago
|
rule: function () {return true;}
|
||
8 years ago
|
});
|
||
|
},
|
||
|
|
||
7 years ago
|
_init: function () {
|
||
8 years ago
|
BI.Behavior.superclass._init.apply(this, arguments);
|
||
|
|
||
|
},
|
||
|
|
||
7 years ago
|
doBehavior: function () {
|
||
8 years ago
|
|
||
|
}
|
||
|
});
|