OSDN Git Service

Version 0.6.156, add X.UI.Repeater.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 14_ChromeBox.js
index 82b387b..7053192 100644 (file)
@@ -51,16 +51,19 @@ X.UI.ChromeBox = X.UI.Box.inherits(
                Constructor : function(){\r
                        X_Pair_create( this, XUI_ChromeBox( this, XUI_Layout_Canvas, arguments ) );\r
                },\r
-               add : function( node /* , node, node ... */ ){\r
-                       X_Pair_get( this ).containerNode.addAt( this.numNodes(), Array.prototype.slice.call( arguments ) );\r
+               add : function( /* node, node, node ... */ ){\r
+                       X_Pair_get( this ).containerNode.addAt( this.numNodes(), X_Object_cloneArray( arguments ) );\r
                        return this;\r
                },\r
-               addAt : function( index, node /* , node, node ... */ ){\r
-                       X_Pair_get( this ).containerNode.addAt( index, Array.prototype.slice.call( arguments, 1 ) );\r
+               addAt : function( index /* , node, node, node ... */ ){\r
+                       var nodes;\r
+                       if( index < 0 ) index = 0;\r
+                       nodes = X_Object_cloneArray( arguments );\r
+                       X_Pair_get( this ).containerNode.addAt( nodes.shift(), nodes );\r
                        return this;\r
                },\r
                remove : function( node /* , node, node ... */ ){\r
-                       X_Pair_get( this ).containerNode[ 'remove' ]( arguments );\r
+                       X_Pair_get( this ).containerNode.remove( arguments );\r
                        return this;\r
                },\r
                removeAt : function( from, length ){\r
@@ -76,26 +79,11 @@ X.UI.ChromeBox = X.UI.Box.inherits(
                getLastChild : function(){\r
                        return X_Pair_get( this ).containerNode.User.getLastChild();\r
                },\r
-               getNodeByUID : function( uid ){\r
-                       return X_Pair_get( this ).containerNode.User.getNodeByUID();\r
-               },\r
                getNodeAt : function( index ){\r
                        return X_Pair_get( this ).containerNode.User.getNodeAt( index );\r
                },\r
                numNodes : function(){\r
                        return X_Pair_get( this ).containerNode.User.numNodes();\r
-               },\r
-               getContainerNode : function(){\r
-                       return X_Pair_get( this ).containerNode.User;\r
-               },\r
-               getChromeNodeAt : function( index ){\r
-                       if( index < 0 ) return null;\r
-                       var nodes = X_Pair_get( this ).chromeNodes;\r
-                       return nodes ? nodes[ index ].User || null : null;\r
-               },\r
-               numChromeNodes : function(){\r
-                       var nodes = X_Pair_get( this ).chromeNodes;\r
-                       return nodes ? nodes.length : 0;\r
                }\r
        }\r
 );
\ No newline at end of file