X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F20_ui%2F06_AbstractUINode.js;h=f3b9c1fbe8a31d2a3e82338c48bd637bc3428324;hb=a4b6249d16b938ce6fd1c7691f144ff99729056f;hp=d229636b690f32e55e0f8b162961c974d294ab5d;hpb=51e22031f9629d4bc32444a0228930642144ee9e;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/20_ui/06_AbstractUINode.js b/0.6.x/js/20_ui/06_AbstractUINode.js index d229636..f3b9c1f 100644 --- a/0.6.x/js/20_ui/06_AbstractUINode.js +++ b/0.6.x/js/20_ui/06_AbstractUINode.js @@ -66,7 +66,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( this.rootData = rootData; this.parent = parent; this.parentData = parentData; - //this.xnode = X.Dom.Node.create( 'div' ); + //this.xnode = X.Node.create( 'div' ); this.phase = 1; this.dispatch( X.UI.Event.INIT ); @@ -144,7 +144,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( if( v.indexOf( ' ' ) !== -1 ){ v = v.split( ' ' ); } else - if( color && X.Type.isNumber( _v = X.Dom.Style.parseColor( v ) ) ){ + if( color && X.Type.isNumber( _v = X.CSS.parseColor( v ) ) ){ v = _v; } else { // bad @@ -412,7 +412,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( }, /** - * X.Dom.BoxModel の情報を引きながら top,left,width,height,padding,border の設定 + * X_Node_BoxModel の情報を引きながら top,left,width,height,padding,border の設定 */ updateLayout : function( x, y ){ this.boxX = x; @@ -601,8 +601,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( */ if( xnode._xnodes && xnode._xnodes.length ){ if( w === X.UI.Attr.AUTO ){ - w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / xnode._getCharSize(); - //console.log( xnode.width() + ' ' + xnode._getCharSize() + ' > ' + w ); + w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / X_Node_CSS_getCharSize( xnode ); this.scrollWidth = w + this.contentL + this.contentR; if( this.maxContentWidth < w - this.boxSizingOffsetLR ) this.contentWidth = this.maxContentWidth + this.boxSizingOffsetLR; @@ -612,7 +611,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( w !== this.contentWidth && xnode.css( 'width', X.UI._AbstractUINode.ceil( this.contentWidth ) + 'em' ); if( h === X.UI.Attr.AUTO ){ - this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize(); // scrollHeight() ?? + this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ); // scrollHeight() ?? this.scrollHeight = h + this.contentT + this.contentB; if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB; if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB; @@ -627,21 +626,21 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( xnode.css( 'width', X.UI._AbstractUINode.ceil( w ) + 'em' ); this.lastContentWidth = w; - this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize(); + this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ); this.scrollWidth = w + this.contentL + this.contentR; this.scrollHeight = h + this.contentT + this.contentB; if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB; if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB; } else { this.contentHeight = this.lastContentHeight = h = - this.lastContentHeight === -1 ? xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize() : this.lastContentHeight; + this.lastContentHeight === -1 ? xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ) : this.lastContentHeight; this.scrollWidth = w + this.contentL + this.contentR; this.scrollHeight = h + this.contentT + this.contentB; }; } else if( dirty !== X.UI.Dirty.LAYOUT ){ this.contentWidth = this.lastContentWidth = w; //xnode.width(); - this.contentHeight = this.lastContentHeight = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize(); + this.contentHeight = this.lastContentHeight = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ); this.scrollWidth = this.contentWidth + this.contentL + this.contentR; this.scrollHeight = this.contentHeight + this.contentT + this.contentB; } else { @@ -778,11 +777,11 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( }; }; }; - f = X.Callback._classifyCallbackArgs( arg1, arg2, arg3 ); + f = X_Callback_classifyCallbackArgs( arg1, arg2, arg3 ); if( !f.k ){ return X_EventDispatcher_listen.call( this, type, this.User, f ); } else - if( f.k === X.Callback._FUNC_ONLY ){ + if( f.k === X_Callback_FUNC_ONLY ){ return X_EventDispatcher_listen.call( this, type, this.User, f.f, f.s ); }; return X_EventDispatcher_listen.apply( this, arguments ); @@ -815,11 +814,11 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( }; }; }; - f = X.Callback._classifyCallbackArgs( arg1, arg2, arg3 ); + f = X_Callback_classifyCallbackArgs( arg1, arg2, arg3 ); if( !f.k ){ return X.EventDispatcher.prototype.unlisten.apply( this, [ type, this.User, f ] ); } else - if( f.k === X.Callback._FUNC_ONLY ){ + if( f.k === X_Callback_FUNC_ONLY ){ return X.EventDispatcher.prototype.unlisten.apply( this, [ type, this.User, f.f, f.s ] ); }; return X.EventDispatcher.prototype.unlisten.apply( this, arguments ); @@ -874,10 +873,10 @@ X.UI.AbstractUINode = X.Class.create( X.Class.ABSTRACT | X.Class.SUPER_ACCESS, { parent : function(){ - return X.Class._getPrivate( this ).parent; + return X_Class_getPrivate( this ).parent; }, root : function(){ - return X.Class._getPrivate( this ).root; + return X_Class_getPrivate( this ).root; }, /* @@ -885,7 +884,7 @@ X.UI.AbstractUINode = X.Class.create( * サポートされていない場合は無視される.親のレイアウトによって変わる */ attr : function( nameOrObject, valueOrUnit ){ - var p = X.Class._getPrivate( this ), + var p = X_Class_getPrivate( this ), layout, k, def, attrs, v; if( nameOrObject && X.Type.isObject( nameOrObject ) ){ // setter @@ -921,22 +920,22 @@ X.UI.AbstractUINode = X.Class.create( }, listen : function( type, arg1, arg2, arg3 ){ - X.Class._getPrivate( this ).listen( type, arg1, arg2, arg3 ); + X_Class_getPrivate( this ).listen( type, arg1, arg2, arg3 ); return this; }, listenOnce : function( type, arg1, arg2, arg3 ){ - X.Class._getPrivate( this ).listenOnce( type, arg1, arg2, arg3 ); + X_Class_getPrivate( this ).listenOnce( type, arg1, arg2, arg3 ); return this; }, listening : function( type, arg1, arg2, arg3 ){ - return X.Class._getPrivate( this ).listening( type, arg1, arg2, arg3 ); + return X_Class_getPrivate( this ).listening( type, arg1, arg2, arg3 ); }, unlisten : function( type, arg1, arg2, arg3 ){ - X.Class._getPrivate( this ).unlisten( type, arg1, arg2, arg3 ); + X_Class_getPrivate( this ).unlisten( type, arg1, arg2, arg3 ); return this; }, dispatch : function( e ){ - return X.Class._getPrivate( this ).dispatch( e ); + return X_Class_getPrivate( this ).dispatch( e ); }, getNextNode : function(){ @@ -946,7 +945,7 @@ X.UI.AbstractUINode = X.Class.create( }, nodeIndex : function( v ){ - var data = X.Class._getPrivate( this ); + var data = X_Class_getPrivate( this ); if( typeof v === 'number' ){ // data.nodeIndex( v ); return this; @@ -958,44 +957,44 @@ X.UI.AbstractUINode = X.Class.create( }, getX : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).boxX; + return X_Class_getPrivate( this ).boxX; }, getY : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).boxY; + return X_Class_getPrivate( this ).boxY; }, getAbsoluteX : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).absoluteX; + return X_Class_getPrivate( this ).absoluteX; }, getAbsoluteY: function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).absoluteY; + return X_Class_getPrivate( this ).absoluteY; }, getWidth : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).boxWidth; + return X_Class_getPrivate( this ).boxWidth; }, getHeight : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).boxHeight; + return X_Class_getPrivate( this ).boxHeight; }, scrollTo : function( x, y ){ - X.Class._getPrivate( this ).scrollTo( x, y ); + X_Class_getPrivate( this ).scrollTo( x, y ); }, getScrollX : function( v ){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).scrollX( v ); + return X_Class_getPrivate( this ).scrollX( v ); }, getScrollY : function( v ){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).scrollY( v ); + return X_Class_getPrivate( this ).scrollY( v ); }, disabled : function( v ){ - return X.Class._getPrivate( this ).disabled( v ); + return X_Class_getPrivate( this ).disabled( v ); }, cursor : function( v ){ - return X.Class._getPrivate( this ).cursor( v ); + return X_Class_getPrivate( this ).cursor( v ); } } );