OSDN Git Service

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