-X.UI._AbstractUINode = X.EventDispatcher.inherits(\r
+X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](\r
'X.UI._AbstractUINode',\r
X.Class.ABSTRACT | X.Class.PRIVATE_DATA,\r
{\r
//this.xnode = X_Doc_create( 'div' );\r
this.phase = 1;\r
\r
- this.dispatch( X.UI.Event.INIT );\r
+ this[ 'dispatch' ]( X.UI.Event.INIT );\r
},\r
\r
addToParent : function( xnodeParent ){\r
- xnodeParent && xnodeParent.append( this.xnode );\r
+ xnodeParent && xnodeParent[ 'append' ]( this.xnode );\r
\r
this.phase = 2;\r
- this.dispatch( X.UI.Event.ADDED );\r
+ this[ 'dispatch' ]( X.UI.Event.ADDED );\r
},\r
\r
creationComplete : function(){\r
l, i;\r
\r
this.phase = 3;\r
- this.User.dispatch( X.UI.Event.CREATION_COMPLETE );\r
+ this.User[ 'dispatch' ]( X.UI.Event.CREATION_COMPLETE );\r
\r
// html 要素が親に追加されるまで控えていたイベントの登録\r
if( events && ( l = events.length ) ){\r
};\r
\r
if( !X.UI.attrClassProto && user === X.UI.Attr.USER.XNODE && this.xnode ){\r
- this.xnode.css( X.UI.Attr.Rename[ name ] || name, this._createCssText( name ) );\r
+ this.xnode[ 'css' ]( X.UI.Attr.Rename[ name ] || name, this._createCssText( name ) );\r
//console.log( ( X.UI.Attr.Rename[ name ] || name ) + ' ' + this._createCssText( name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
};\r
return;\r
};\r
\r
if( name && user === X.UI.Attr.USER.XNODE && this.xnode ){\r
- this.xnode.css( X.UI.Attr.Rename[ name ] || name, this._createCssText( name ) );\r
+ this.xnode[ 'css' ]( X.UI.Attr.Rename[ name ] || name, this._createCssText( name ) );\r
//console.log( ( X.UI.Attr.Rename[ name ] || name ) + ' ' + this._createCssText( name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
} else\r
if( this.dirty < dirty ) this.dirty = dirty; \r
this.boxX = x;\r
this.boxY = y;\r
this.xnode\r
- .css( 'left', x ? x + 'em' : 0 )\r
- .css( 'top', y ? y + 'em' : 0 )\r
- .css( 'width', this.contentWidth ? X.UI._AbstractUINode.ceil( this.contentWidth ) + 'em' : 0 )\r
- .css( 'height', this.contentHeight ? X.UI._AbstractUINode.ceil( this.contentHeight ) + 'em' : 0 )\r
- .css( 'padding', this._createCssText( 'padding' ) )\r
- .css( 'borderWidth', this._createCssText( 'borderWidth' ) );\r
+ [ 'css' ]( 'left', x ? x + 'em' : 0 )\r
+ [ 'css' ]( 'top', y ? y + 'em' : 0 )\r
+ [ 'css' ]( 'width', this.contentWidth ? X.UI._AbstractUINode.ceil( this.contentWidth ) + 'em' : 0 )\r
+ [ 'css' ]( 'height', this.contentHeight ? X.UI._AbstractUINode.ceil( this.contentHeight ) + 'em' : 0 )\r
+ [ 'css' ]( 'padding', this._createCssText( 'padding' ) )\r
+ [ 'css' ]( 'borderWidth', this._createCssText( 'borderWidth' ) );\r
},\r
\r
/*\r
* コンテンツの高さの再取得が必要\r
* 必要でない\r
*/\r
- if( xnode._xnodes && xnode._xnodes.length ){\r
+ if( xnode[ '_xnodes' ] && xnode[ '_xnodes' ].length ){\r
if( w === X.UI.Attr.AUTO ){\r
- w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / X_Node_CSS_getCharSize( xnode );\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
if( w - this.boxSizingOffsetLR < this.minContentWidth ) this.contentWidth = this.minContentWidth + this.boxSizingOffsetLR;\r
this.lastContentWidth = this.contentWidth;\r
\r
- w !== this.contentWidth && xnode.css( 'width', X.UI._AbstractUINode.ceil( this.contentWidth ) + 'em' );\r
+ 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() / X_Node_CSS_getCharSize( xnode ); // 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
} else\r
if( h === X.UI.Attr.AUTO ){\r
if( w !== this.lastContentWidth ){\r
- xnode.css( 'width', X.UI._AbstractUINode.ceil( w ) + 'em' );\r
+ xnode[ 'css' ]( 'width', X.UI._AbstractUINode.ceil( w ) + 'em' );\r
\r
this.lastContentWidth = w;\r
- this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode );\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() / X_Node_CSS_getCharSize( xnode ) : 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() / X_Node_CSS_getCharSize( xnode );\r
+ this.contentWidth = this.lastContentWidth = w; //xnode[ 'width' ]();\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
if( !this.gesture ){\r
this.gesture = new X.UI.Gesture( this.rootData, this, type );\r
} else {\r
- this.gesture.listen( type );\r
+ this.gesture[ 'listen' ]( type );\r
};\r
} else {\r
//console.log( type );\r
++counter[ type ];\r
} else {\r
counter[ type ] = 1; \r
- root.xnodeInteractiveLayer.listen( X.UI.Event.IdToName[ type ], X_UI_eventRellay );\r
+ root.xnodeInteractiveLayer[ 'listen' ]( X.UI.Event.IdToName[ type ], X_UI_eventRellay );\r
};\r
};\r
};\r
f = X_Callback_classifyCallbackArgs( arg1, arg2, arg3 );\r
- if( !f.k ){\r
+ if( !f.kind ){\r
return X_EventDispatcher_listen.call( this, type, this.User, f );\r
} else\r
- if( f.k === X_Callback_FUNC_ONLY ){\r
- return X_EventDispatcher_listen.call( this, type, this.User, f.f, f.s );\r
+ if( f.kind === X_Callback_FUNC_ONLY ){\r
+ return X_EventDispatcher_listen.call( this, type, this.User, f.func, f.supplement );\r
};\r
return X_EventDispatcher_listen.apply( this, arguments );\r
},\r
};\r
\r
if( X.UI.Event._START_XUI_EVENT < type && type < X.UI.Event._END_XUI_EVENT ){\r
- this.gesture && this.gesture.unlisten( type );\r
+ this.gesture && this.gesture[ 'unlisten' ]( type );\r
} else {\r
root = this.rootData;\r
counter = root.eventCounter;\r
if( !counter[ type ] ) return this;\r
--counter[ type ];\r
if( counter[ type ] === 0 ){\r
- root.xnodeInteractiveLayer.unlisten( X.UI.Event.IdToName[ type ], X_UI_eventRellay );\r
+ root.xnodeInteractiveLayer[ 'unlisten' ]( X.UI.Event.IdToName[ type ], X_UI_eventRellay );\r
delete counter[ type ];\r
};\r
};\r
};\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
+ if( !f.kind ){\r
+ return X_EventDispatcher_unlisten.apply( this, [ type, this.User, f ] );\r
} else\r
- if( f.k === X_Callback_FUNC_ONLY ){\r
- return X.EventDispatcher.prototype.unlisten.apply( this, [ type, this.User, f.f, f.s ] );\r
+ if( f.kind === X_Callback_FUNC_ONLY ){\r
+ return X_EventDispatcher_unlisten.apply( this, [ type, this.User, f.func, f.supplement ] );\r
};\r
- return X.EventDispatcher.prototype.unlisten.apply( this, arguments );\r
+ return X_EventDispatcher_unlisten.apply( this, arguments );\r
},\r
\r
dispatch : function( e ){\r
type = e.type || e;\r
\r
// TODO captureEvent PointerEvent\r
- if( ret & X.Callback.MONOPOLY && !this.hitChildData && ( xve._POINTER_MOVE === type || xve._MOUSE_MOVE === type || xve.FILE_DRAG === type ) ){\r
+ if( ret & X_Callback_MONOPOLY && !this.hitChildData && ( xve._POINTER_MOVE === type || xve._MOUSE_MOVE === type || xve.FILE_DRAG === type ) ){\r
this.rootData.monopolyNodeData = this;\r
return ret;\r
};\r
this.rootData.monopolyNodeData = null;\r
- if( xve._START_BUBLEUP < type && this.parentData && !( ret & X.Callback.STOP_PROPAGATION ) && !( ret & X.Callback.STOP_NOW ) ) return this.parentData.dispatch( e );\r
+ if( xve._START_BUBLEUP < type && this.parentData && !( ret & X_Callback_STOP_PROPAGATION ) && !( ret & X_Callback_STOP_NOW ) ) return this.parentData[ 'dispatch' ]( e );\r
return ret;\r
}\r
\r
return ( -v * 10 + 0.999 | 0 ) / -10;\r
};\r
\r
-X.UI.AbstractUINode = X.Class.create(\r
+X.UI.AbstractUINode = X_Class_create(\r
'AbstractUINode',\r
X.Class.ABSTRACT | X.Class.SUPER_ACCESS,\r
{\r
},\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