1 var XUI_ChromeBox = XUI_Box.inherits(
\r
6 containerNode : null,
\r
8 Constructor : function( user, layout, args ){
\r
9 var uinodes, i, l, node, after, index = 0;
\r
11 this[ 'Super' ]( user, layout, args );
\r
13 uinodes = this.uinodes;
\r
14 l = i = uinodes.length;
\r
17 node = uinodes[ --i ];
\r
18 if( node.role === 3 ){
\r
19 if( this.containerNode ){
\r
20 //throw new Error( 'ContainerNode が複数設定されています!ContainerNode はクロームボックスにひとつ、生成時に設定できます ' + node );
\r
22 this.containerNode = node.User;
\r
23 this._containerNode = node;
\r
25 if( !this.chromeNodes ) this.chromeNodes = [];
\r
26 this.chromeNodes[ this.chromeNodes.length ] = node;
\r
29 if( !this.containerNode ){
\r
30 //throw new Error( 'ContainerNode が設定されてい\ません!ContainerNode はクロームボックスにひとつ、生成時に設定できます ' );
\r
33 for( i = 0, l = args.length; i < l; ++i ){
\r
35 if( node === this.containerNode ){
\r
39 if( node[ 'instanceOf' ] && node[ 'instanceOf' ]( Node ) ){
\r
47 X.UI.ChromeBox = X.UI.Box.inherits(
\r
51 Constructor : function(){
\r
52 X_Pair_create( this, XUI_ChromeBox( this, XUI_Layout_Canvas, arguments ) );
\r
54 add : function( /* node, node, node ... */ ){
\r
55 X_Pair_get( this ).containerNode.addAt( this.numNodes(), X_Object_cloneArray( arguments ) );
\r
58 addAt : function( index /* , node, node, node ... */ ){
\r
60 if( index < 0 ) index = 0;
\r
61 nodes = X_Object_cloneArray( arguments );
\r
62 X_Pair_get( this ).containerNode.addAt( nodes.shift(), nodes );
\r
65 remove : function( node /* , node, node ... */ ){
\r
66 X_Pair_get( this ).containerNode.remove( arguments );
\r
69 removeAt : function( from, length ){
\r
70 X_Pair_get( this ).containerNode.removeAt( from, length );
\r
73 getNodesByClass : function( klass ){
\r
74 return X_Pair_get( this ).containerNode.User.getNodesByClass( klass );
\r
76 getFirstChild : function(){
\r
77 return X_Pair_get( this ).containerNode.User.getFirstChild();
\r
79 getLastChild : function(){
\r
80 return X_Pair_get( this ).containerNode.User.getLastChild();
\r
82 getNodeAt : function( index ){
\r
83 return X_Pair_get( this ).containerNode.User.getNodeAt( index );
\r
85 numNodes : function(){
\r
86 return X_Pair_get( this ).containerNode.User.numNodes();
\r