1 var _ChromeBox = _Box.inherits(
\r
3 X.Class.PRIVATE_DATA | X.Class.SUPER_ACCESS,
\r
6 containerNode : null,
\r
7 Constructor : function( layout, args ){
\r
8 this.SuperConstructor( layout, args );
\r
12 var nodes = this.nodes,
\r
16 node = nodes[ --i ];
\r
17 if( node.forContainer === true ){
\r
18 if( this.containerNode ){
\r
19 //throw new Error( 'ContainerNode が複数設定されています!ContainerNode はクロームボックスにひとつ、生成時に設定できます ' + node );
\r
21 this.containerNode = node;
\r
23 if( !this.chromeNodes ) this.chromeNodes = [];
\r
24 this.chromeNodes[ this.chromeNodes.length ] = node;
\r
27 if( !this.containerNode ){
\r
28 //throw new Error( 'ContainerNode が設定されてい\ません!ContainerNode はクロームボックスにひとつ、生成時に設定できます ' );
\r
34 var ChromeBox = Box.inherits(
\r
36 X.Class.SUPER_ACCESS,
\r
39 Constructor : function(){
\r
40 this.style = DisplayNodeStyle( this, X.Class._newPrivate( this, BasicLayoutManager, arguments ) );
\r
41 this.style.addName( 'ChromeBox' );
\r
43 add : function( node /* , node, node ... */ ){
\r
44 X.Class._getPrivate( this ).containerNode.addAt( this.numNodes(), Array.prototype.slice.call( arguments ) );
\r
47 addAt : function( index, node /* , node, node ... */ ){
\r
48 X.Class._getPrivate( this ).containerNode.addAt( index, Array.prototype.slice.call( arguments, 1 ) );
\r
51 remove : function( node /* , node, node ... */ ){
\r
52 X.Class._getPrivate( this ).containerNode.remove( arguments );
\r
55 removeAt : function( from, length ){
\r
56 X.Class._getPrivate( this ).containerNode.removeAt( from, length );
\r
59 getNodesByClass : function( klass ){
\r
60 return X.Class._getPrivate( this ).containerNode.User.getNodesByClass( klass );
\r
62 getFirstChild : function(){
\r
63 return X.Class._getPrivate( this ).containerNode.User.getFirstChild();
\r
65 getLastChild : function(){
\r
66 return X.Class._getPrivate( this ).containerNode.User.getLastChild();
\r
68 getNodeByUID : function( uid ){
\r
69 return X.Class._getPrivate( this ).containerNode.User.getNodeByUID();
\r
71 getNodeAt : function( index ){
\r
72 return X.Class._getPrivate( this ).containerNode.User.getNodeByUID( index );
\r
74 numNodes : function(){
\r
75 return X.Class._getPrivate( this ).containerNode.User.numNodes();
\r
77 getContainerNode : function(){
\r
78 return X.Class._getPrivate( this ).containerNode.User;
\r
80 getChromeNodeAt : function( index ){
\r
81 if( index < 0 ) return null;
\r
82 var nodes = X.Class._getPrivate( this ).chromeNodes;
\r
83 return nodes ? nodes[ index ].User || null : null;
\r
85 numChromeNodes : function(){
\r
86 var nodes = X.Class._getPrivate( this ).chromeNodes;
\r
87 return nodes ? nodes.length : 0;
\r