OSDN Git Service

Version 0.6.23, remove AbstractBox(AbstractDisplayContainer), working ie-filter-fix.
[pettanr/clientJs.git] / 0.6.x / js / ui / 09_UINodeStyle.js
1
2
3 var _DisplayNodeStyle = X.Class.create(
4         '_DisplayNodeStyle',
5         X.Class.PRIVATE_DATA,
6         {
7                 Constructor : function( node, nodeData ){
8                         this.node= node;
9                         this.nodeData= nodeData;
10                         
11                         nodeData.style= this.User;
12                         nodeData.styleData= this;
13                         
14                         this._cssObj= {};
15                         
16                         if( nodeData.tmpCss ){
17                                 if( nodeData.tmpCss.role === 'container' ) nodeData.forContainer = true;
18                                 if( nodeData.tmpCss.role === 'chrome' ) nodeData.forChrome = true;
19                         };
20                 },
21                 initialize : function(){
22                         if( this.nodeData.layout ){
23                                 this.allow = this.nodeData.layout.allowForSelf; // これに加えて親の allowForChild を合成
24                         } else
25                         if( this.nodeData.parentData.layout ){
26                                 this.allow = this.nodeData.parentData.layout.allowForChild;
27                         } else {
28                                 this.allow = void 0;
29                         };
30                         
31                         if( this.nodeData.tmpCss ){
32                                 this.css( this.nodeData.tmpCss );
33                                 delete this.nodeData.tmpCss;
34                         };
35                 },
36                 
37                 afterAddition : function(){
38                         var elm = this.nodeData.rawElement;
39                         if( elm ){
40                                 if( this._name ){
41                                         elm.className( this._name );
42                                         // dirty flag
43                                 };
44                                 if( this._cssText ){
45                                         elm.cssText( this._cssText );
46                                 };              
47                         };      
48                 },
49                 
50                 name : function( v ){
51                         var sp = ' ', sp2 = '  ', elm;
52                         if( this._name !== v ){
53                                 if( !v ){
54                                         delete this._name;
55                                         v = '';
56                                 } else {
57                                         // cleanup
58                                         while( v.indexOf( sp2 ) !== -1 ){ v = v.split( sp2 ).join( sp ); };
59                                         while( 0 < v.length && v.charAt( 0 ) === sp ){ v = v.substr( 1 ); };
60                                         while( 0 < v.length && v.lastIndexOf( sp ) === 0 ){ --v.length; };
61                                                                         
62                                         if( !v.length ){
63                                                 delete this._name;
64                                                 v = '';
65                                         } else {
66                                                 this._name = v;
67                                         };
68                                 };
69                                 if( elm = this.nodeData.rawElement ){
70                                         //elm.className = v;
71                                         elm.className( v );
72                                 };
73                         };
74                         return this.User;
75                 },
76                 addName : function( _names ){
77                         var sp = ' ',
78                                 names, _name, i;
79                         if( !this._name || !this._name.length ) return this.name( _names );
80                         _names = _names.split( sp );
81                         for( i = _names.length; i; ){
82                                 if( ( _name = _names[ --i ] ) !== '' && this.hasName( _name ) === false ){
83                                         if( !names ) names = this._name.split( sp );
84                                         names[ names.length ] = _name;
85                                 };                              
86                         };
87                         return this.name( names.join( sp ) );
88                 },
89                 removeName : function( _names ){
90                         var sp    = ' ',
91                                 names = this._name,
92                                 i, index;
93                         if( !names || !names.length ) return this.User;
94                         names  = names.split( sp );
95                         _names = _names.split( sp );
96                         for( i = _names.length; i; ){
97                                 ( index = names.indexOf( _names[ --i ] ) ) !== -1 && names.splice( index, 1 );
98                         };
99                         return this.name( names.join( sp ) );
100                 },
101                 hasName : function( _names ){
102                         var names = this._name, i;
103                         if( !names || !names.length ) return false;
104                         names  = names.split( ' ' );
105                         _names = _names.split( ' ' );
106                         for( i = _names.length; i; ){
107                                 if( names.indexOf( _names[ --i ] ) === -1 ) return false;
108                         };
109                         return true;
110                 },
111                 cssText : function( v ){
112                         var elm, style;
113                         if( this._cssText !== v ){
114                                 this._cssText = v;
115                                 //if( style = this.nodeData.rawStyle ){
116                                 //      style.cssText = v;
117                                 //};
118                                 if( elm = this.nodeData.rawElement ) elm.cssText( v );
119                         };
120                 },
121                 css : function( v ){
122                         var css    = this._cssObj,
123                                 allow  = this.allow,
124                                 TRANS  = {
125                                         x : 'left',
126                                         y : 'top'
127                                 },
128                                 REMOVE = {
129                                         role : 0
130                                 }, p;
131                         for( p in v ){
132                                 if( REMOVE[ p ] === 0 ) continue;
133
134                                 switch( p = TRANS[ p ] || p ){
135                                         case 'name' :
136                                                 this.addName( v[ p ] );
137                                                 continue;
138                                         case 'hoverStyleName' :
139                                                 this.nodeData.hoverStyleName = v[ p ];
140                                                 this.nodeData.hover = !!( v[ p ] && v[ p ].length );
141                                                 continue;
142                                         case 'left' :
143                                                 if( allow.x === false ) continue;
144                                                 break;
145                                         case 'top' :
146                                                 if( allow.y === false ) continue;
147                                                 break;
148                                         case 'width' :
149                                                 if( allow.w === false ) continue;
150                                                 break;
151                                         case 'height' :
152                                                 if( allow.h === false ) continue;
153                                                 break;
154                                         case 'gapX' :
155                                                 if( allow.gapX === false ) continue;
156                                                 break;
157                                         case 'gapY' :
158                                                 if( allow.gapY === false ) continue;
159                                                 break;
160                                         case 'padding' :
161                                                 if( allow.padding === false ) continue;
162                                                 break;
163                                 };
164                                 css[ p ] = v[ p ];
165                         };
166                         this.cssText( X.Dom.Style.objToCssText( css ) );
167                 },
168                 layout : function( x, y, w, h ){
169                         var isFinite = X.Type.isFinite,
170                                 isString = X.Type.isString,
171                                 obj      = this._cssObj,
172                                 data     = this.nodeData,
173                                 elm      = data.rawElement,
174                                 //style    = data.rawStyle,
175                                 parent;
176                         
177                         if( elm ){
178                                 // width
179                                 if( isFinite( w ) === true ){
180                                         elm.css( { width : w + 'px' } );
181                                         //style.width = w + 'px';
182                                         obj.width   = w;
183                                 } else
184                                 if( isString( w ) === true ){
185                                         obj.width = w;
186                                         elm.css( { width : w } );
187                                         w = elm.width();// elm.offsetWidth;
188                                 };
189                                 // height
190                                 if( isFinite( h ) === true ){
191                                         //style.height = h + 'px';
192                                         elm.css( { height : h + 'px' } );
193                                         obj.height   = h;
194                                 } else
195                                 if( isString( h ) === true ){
196                                         obj.height = h;
197                                         elm.css( { height : h } );
198                                         h = elm.height(); //elm.offsetHeight;
199                                 };
200                                 
201                                 // x
202                                 if( isFinite( x ) === true ){
203                                         //style.left = x + 'px';
204                                         elm.css( { left : x + 'px' } );
205                                         obj.left = x;
206                                 } else
207                                 if( isString( x ) === true ){
208                                         obj.left = x;
209                                         elm.css( { left : x } );
210                                         x = elm.x(); // elm.offsetLeft;
211                                 };
212                                 
213                                 // y
214                                 if( isFinite( y ) === true ){
215                                         //style.top = y + 'px';
216                                         elm.css( { top : y + 'px' } );
217                                         obj.top   = y;
218                                 } else
219                                 if( isString( y ) === true ){
220                                         obj.top = y;
221                                         elm.css( { top : y } );
222                                         y = elm.y(); // elm.offsetTop;
223                                 };
224                         };
225                         x = isFinite( x ) === true ? x : data.x;
226                         y = isFinite( y ) === true ? y : data.y;
227                         w = isFinite( w ) === true ? w : data.w;
228                         h = isFinite( h ) === true ? h : data.h;
229                         if( data.x !== x || data.y !== y ){
230                                 data.x = x;
231                                 data.y = y;
232                                 ( parent = data.parentData ) && data.updateAbsoluteXY( parent.absoluteX, parent.absoluteY );
233                                 if( data.w === w && data.h === h ){
234                                         data.updateRectangle();
235                                         4 <= data.phase && data.rootData.reserveCalc();
236                                         return;
237                                 };
238                         };
239                         if( data.w !== w || data.h !== h ){
240                                 data.w = w;
241                                 data.h = h;
242                                 data.updateRectangle();
243                                 4 <= data.phase && data.rootData.reserveCalc();
244                         };
245                         
246                         // ScrollBarManager.update( this );
247                 },
248                 
249                 /*
250                  * opt_unit は getter のみ
251                  */
252                 attr : function( prop, v, opt_unit ){
253                         var update    = prop[ 0 ],
254                                 propID    = prop[ 1 ],
255                                 type      = prop[ 2 ],
256                                 list      = prop[ 3 ],
257                                 length    = !!( type & X.Css.Type.LENGTH    ),
258                                 percent   = !!( type & X.Css.Type.PERCENT   ),
259                                 color     = !!( type & X.Css.Type.COLOR     ),
260                                 uDecimal  = !!( type & X.Css.Type.U_DECIMAL ),
261                                 numerical = !!( type & X.Css.Type.NUMERICAL ),
262                                 flag      = !!( type & X.Css.Type.BOOLEAN   ),
263                                 quartet   = !!( type & X.Css.Type.QUARTET   ),
264                                 url       = !!( type & X.Css.Type.URL       ),
265                                 fontName  = !!( type & X.Css.Type.FONT_NAME ),
266                                 //list      = !!( type & X.Css.Type.LIST      ),
267                                 combi     = !!( type & X.Css.Type.COMBI     ),
268                                 data      = this.data,
269                                 _v        = -1,
270                                 i, l, nodes, root, roots;
271                 /*
272                  * Setter
273                  */
274                         if( v !== undefined ){
275                                 if( Type.isNumber( v ) === true ){
276                                         if( numerical === false ){
277                                                 if( uDecimal === false || v < 0 || 1 < v ){} //throw new Error( '' );
278                                         };
279                                 } else
280                                 if( Type.isBoolean( v ) === true ){
281                                         if( flag === false ){} //throw new Error( '' );
282                                 } else
283                                 if( Type.isString( v ) === true ){
284                                         if( url === false && fontName === false ){
285                                                 if( v.indexOf( ' ' ) !== -1 ){
286                                                         v = v.split( ' ' );
287                                                 } else {
288                                                         if( length === false && percent === false && color === false ){} //throw new Error( '' );
289                                                 };
290                                         };
291                                 };                                      
292                                 if( Type.isArray( v ) === true ){
293                                         if( v.length <= 4 && quartet === true ){
294                                                 type ^= X.Css.Type.QUARTET;
295                                         } else
296                                         if( v.length === 2 && combi === true ){
297                                                 type ^= X.Css.Type.COMBI;
298                                         } else {
299                                                 //throw new Error( '' );
300                                         };
301                                         switch( v.length ){
302                                                 case 1 :
303                                                         this.attr( [ propID  , type, list ], v[ 0 ] );
304                                                         this.attr( [ ++propID, type, list ], v[ 0 ] );
305                                                         this.attr( [ ++propID, type, list ], v[ 0 ] );
306                                                         this.attr( [ ++propID, type, list ], v[ 0 ] );
307                                                         break;
308                                                 case 2 :
309                                                         this.attr( [ propID  , type, list ], v[ 0 ] );
310                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
311                                                         this.attr( [ ++propID, type, list ], v[ 0 ] );
312                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
313                                                         break;
314                                                 case 3 :
315                                                         this.attr( [ propID  , type, list ], v[ 0 ] );
316                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
317                                                         this.attr( [ ++propID, type, list ], v[ 2 ] );
318                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
319                                                         break;
320                                                 case 4 :
321                                                         this.attr( [ propID  , type, list ], v[ 0 ] );
322                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
323                                                         this.attr( [ ++propID, type, list ], v[ 2 ] );
324                                                         this.attr( [ ++propID, type, list ], v[ 3 ] );
325                                                         break;
326                                                 default :
327                                         };
328                                         return this.User;
329                                 };
330                                 switch( update ){
331                                         case X.Css.Dirty.REFLOW :
332                                                 delete this.layoutCssText;
333                                                 break;
334                                         case X.Css.Dirty.PAINT :
335                                                 delete this.colorCssText;
336                                                 break;
337                                         case X.Css.Dirty.FONT :
338                                                 delete this.fontCssText;
339                                 };
340
341                                 if( this.dirty < update ){
342                                         this.dirty = update;
343                                         roots = this.rootList;
344                                         for( i = 0, l = roots.length; i < l; ++i ){
345                                                 root = roots[ i ];
346                                                 if( root.dirty < update ) root.dirty = update;
347                                         };
348                                 };
349                                 
350                                 if( list ) _v = list.indexOf( v );
351                                 data[ propID ] = _v !== -1 ? _v : v;
352                                 
353                                 switch( propID ){
354                                         case X.Css.AttrNo.left  :
355                                         case X.Css.AttrNo.right :
356                                                 this.constraintW = Type.isNumber( data[ X.Css.AttrNo.left ] ) || Type.isNumber( data[ X.Css.AttrNo.right ] );
357                                                 break;
358                                         case X.Css.AttrNo.top    :
359                                         case X.Css.AttrNo.bottom :
360                                                 this.constraintH = Type.isNumber( data[ X.Css.AttrNo.top ] ) || Type.isNumber( data[ X.Css.AttrNo.bottom ] );
361                                                 break;
362                                         case X.Css.AttrNo.width :
363                                                 this.autoWidth    = v === AUTO;
364                                                 this.percentWidth = v === FULL || v < 1;
365                                                 break;
366                                         case X.Css.AttrNo.height :
367                                                 this.autoHeight    = v === AUTO;
368                                                 this.percentHeight = v === FULL || v < 1;
369                                                 break;
370                                 };                                      
371                                 return this.User;
372                         };
373                 /*
374                  * Getter
375                  */
376                         v = data[ propID ];
377                         // Unit
378                         if( quartet === true ) return [ v, data[ ++propID ], data[ ++propID ], data[ ++propID ] ];
379                         if( combi   === true ) return [ v, data[ ++propID ] ];
380                         if( list && Type.isNumber( v ) === true ) return list[ v ];
381                         return v;
382                 },
383                 __cssText : function(){
384                         if( this.fontCssText   === null ) this.fontCssText   = this.createFontCssText();
385                         if( this.layoutCssText === null ) this.layoutCssText = this.createLayoutCssText();
386                         if( this.colorCssText  === null ) this.colorCssText  = this.createColorCssText();
387                         return [ this.fontCssText, this.colorCssText, this.layoutCssText ].join( ';' );
388                 },
389                 createFontCssText : function(){
390                         var data = this.data,
391                                 css  = [],
392                                 v;
393                         if( v = data[ X.Css.AttrNo.fontFamily    ] ) css[ 0 ] = 'font-family:' + v;
394                         if( v = data[ X.Css.AttrNo.fontSize      ] ) css[ css.length ] = 'font-size:' + v;
395                         if( v = data[ X.Css.AttrNo.bold          ] ) css[ css.length ] = 'font-weight:bold';
396                         if( v = data[ X.Css.AttrNo.italic        ] ) css[ css.length ] = 'font-style:italic';
397                         if( v = data[ X.Css.AttrNo.lineHeight    ] ) css[ css.length ] = 'line-height:' + v;
398                         if( v = data[ X.Css.AttrNo.letterSpacing ] ) css[ css.length ] = 'letter-spacing:' + v;
399                         if( v = data[ X.Css.AttrNo.wordSpacing   ] ) css[ css.length ] = 'word-spacing:' + v;
400                         if( v = data[ X.Css.AttrNo.align         ] ) css[ css.length ] = 'text-align:' + X.Css.Option.ALIGN[ v ];
401                         if( v = data[ X.Css.AttrNo.transform     ] ) css[ css.length ] = 'text-transform:' + X.Css.Option.TEXT_TRANSFORM[ v ];
402                         return css.join( ';' );
403                 },
404                 createLayoutCssText : function(){
405                         
406                 },
407                 createColorCssText : function(){
408                         var data = this.data,
409                                 css  = [],
410                                 v, x, y, c, b;
411                         if( v = data[ X.Css.AttrNo.borderColor ]      ) css[ 0 ] = 'border-color:' + v;
412                         if( v = data[ X.Css.AttrNo.borderStyle + 0 ]  ) css[ css.length ] = 'border-top-style:' + X.Css.Option.BORDER_STYLE[ v ];
413                         if( v = data[ X.Css.AttrNo.borderStyle + 1 ]  ) css[ css.length ] = 'border-right-style:' + X.Css.Option.BORDER_STYLE[ v ];
414                         if( v = data[ X.Css.AttrNo.borderStyle + 2 ]  ) css[ css.length ] = 'border-bottom-style:' + X.Css.Option.BORDER_STYLE[ v ];
415                         if( v = data[ X.Css.AttrNo.borderStyle + 3 ]  ) css[ css.length ] = 'border-left-style:' + X.Css.Option.BORDER_STYLE[ v ];
416                         if( v = data[ X.Css.AttrNo.cornerRadius + 0 ] ) css[ css.length ] = 'corner-radius-top:' + v;
417                         if( v = data[ X.Css.AttrNo.cornerRadius + 1 ] ) css[ css.length ] = 'corner-radius-right:' + v;
418                         if( v = data[ X.Css.AttrNo.cornerRadius + 2 ] ) css[ css.length ] = 'border-radius-bottom:' + v;
419                         if( v = data[ X.Css.AttrNo.cornerRadius + 3 ] ) css[ css.length ] = 'border-radius-left:' + v;
420                         if( v = data[ X.Css.AttrNo.bgColor          ] ) css[ css.length ] = 'background-color:' + v;
421                         // X.Css.AttrNo.bgAlpha
422                         if( v = data[ X.Css.AttrNo.bgImgUrl         ] ) css[ css.length ] = 'background-image:url(' + v + ')';
423                         x = data[ X.Css.AttrNo.bgImgRepeatX ];
424                         y = data[ X.Css.AttrNo.bgImgRepeatY ];
425                         if( x && y ){
426                                 css[ css.length ] = 'background-repeat:repeat';
427                         } else
428                         if( x ){
429                                 css[ css.length ] = 'background-repeat:repeat-x';
430                         } else 
431                         if( y ){
432                                 css[ css.length ] = 'background-repeat:repeat-y';
433                         };
434                         x = data[ X.Css.AttrNo.bgImgPositionX ];
435                         y = data[ X.Css.AttrNo.bgImgPositionY ];
436                         if( x && y ){
437                                 css[ css.length ] = 'background-position:' + x + ' ' + y;
438                         } else
439                         if( x ){
440                                 css[ css.length ] = 'background-position:' + x + ' 0';
441                         } else 
442                         if( y ){
443                                 css[ css.length ] = 'background-position:0 ' + y;
444                         };
445                         if( v = data[ X.Css.AttrNo.color ]      ) css[ css.length ] = 'color:' + v;
446                         if( v = data[ X.Css.AttrNo.decoration ] ) css[ css.length ] = 'text-decoration:' + X.Css.Option.TEXT_DECORATION[ v ];
447                         x = data[ X.Css.AttrNo.textShadowOffsetX ];
448                         y = data[ X.Css.AttrNo.textShadowOffsetY ];
449                         b = data[ X.Css.AttrNo.textShadowBlur ];
450                         c = data[ X.Css.AttrNo.textShadowColor ];
451                         if( c || x || y || b ){
452                                 css[ css.length ] = 'text-shadow:' + x + ' ' + y + ' ' + b + ' ' + c;
453                         };
454                         /*
455                         X.Css.AttrNo.shadowColor    = [ X.Css.Dirty.PAINT,  23, X.Css.Type.COLOR     ]; // color
456                         X.Css.AttrNo.shadowAlpha    = [ X.Css.Dirty.PAINT,  24, X.Css.Type.U_DECIMAL ]; // 0 - 1
457                         X.Css.AttrNo.shadowOffsetX  = [ X.Css.Dirty.PAINT,  25, X.Css.Type.LENGTH    ]; // em
458                         X.Css.AttrNo.shadowOffsetY  = [ X.Css.Dirty.PAINT,  26, X.Css.Type.LENGTH    ]; // em
459                         X.Css.AttrNo.shadowBlur     = [ X.Css.Dirty.PAINT,  27, X.Css.Type.LENGTH    ]; // em
460                         X.Css.AttrNo.shadowSpread   = [ X.Css.Dirty.PAINT,  28, X.Css.Type.LENGTH    ]; // em
461                         X.Css.AttrNo.shadowInset    = [ X.Css.Dirty.PAINT,  29, X.Css.Type.BOOLEAN   ]; // true / false
462                         */
463                         return css.join( ';' );
464                 },
465                 node         : null,
466                 nodeData     : null,
467                 _name        : '',
468                 allow        : null,
469                 _cssText     : null,
470                 _cssObj      : null
471         }
472 );
473
474 var DisplayNodeStyle = X.Class.create(
475         'DisplayNodeStyle',
476         X.Class.FINAL,
477         _DisplayNodeStyle,
478         {
479                 Constructor : function( node, nodeData ){
480                         X.Class._newPrivate( this, node, nodeData );
481                 },
482                 addName : function( names ){
483                         return X.Class._getPrivate( this ).addName( names );
484                 },
485                 removeName : function( names ){
486                         return X.Class._getPrivate( this ).removeName( names );
487                 },
488                 hasName : function( names ){
489                         return X.Class._getPrivate( this ).hasName( names );
490                 },
491                 cssText : function( v ){
492                         var data = X.Class._getPrivate( this );
493                         if( v ){
494                                 data.cssText( v );
495                                 return this;
496                         };
497                         return data._cssText;
498                 },
499                 css : function( v ){
500                         var data = X.Class._getPrivate( this );
501                         if( v ){
502                                 data.css( v );
503                                 return this;
504                         };
505                         // return data._css;
506                 },
507                 
508                 borderWidth : function( v ){
509                         return X.Class._getPrivate( this ).attr( X.Css.Attr.borderWidth, v );
510                 },
511                 borderColor : function( v ){
512                         return X.Class._getPrivate( this ).attr( X.Css.Attr.borderColor, v );
513                 },
514                 borderStyle : function( v ){
515                         return X.Class._getPrivate( this ).attr( X.Css.Attr.borderStyle, v );
516                 },
517                 cornerRadius : function( v ){
518                         return X.Class._getPrivate( this ).attr( X.Css.Attr.cornerRadius, v );
519                 },
520                 bgColor : function( v ){
521                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgColor, v );
522                 },
523                 bgAlpha : function( v ){
524                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgAlpha, v );
525                 },
526                 bgImgUrl : function( v ){
527                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgUrl, v );
528                 },
529                 bgImgRepeatX : function( v ){
530                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgRepeatX, v );
531                 },
532                 bgImgRepeatY : function( v ){
533                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgRepeatY, v );
534                 },
535                 bgImgPositionX : function( v ){
536                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgPositionX, v );
537                 },
538                 bgImgPositionY : function( v ){
539                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgPositionY, v );
540                 },
541                 shadowColor : function( v ){
542                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowColor, v );
543                 },
544                 shadowAlpha : function( v ){
545                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowAlpha, v );
546                 },
547                 shadowOffsetX : function( v ){
548                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowOffsetX, v );
549                 },
550                 shadowOffsetY : function( v ){
551                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowOffsetY, v );
552                 },
553                 shadowBlur : function( v ){
554                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowBlur, v );
555                 },
556                 shadowSpread : function(){
557                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowSpread, v );
558                 },
559                 shadowInset : function(){
560                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowInset, v );
561                 },
562                 color : function( v ){
563                         return X.Class._getPrivate( this ).attr( X.Css.Attr.color, v );
564                 },
565                 fontFamily : function( v ){
566                         return X.Class._getPrivate( this ).attr( X.Css.Attr.fontFamily, v );
567                 },
568                 fontSize : function( v ){
569                         return X.Class._getPrivate( this ).attr( X.Css.Attr.fontSize, v );
570                 },
571                 bold : function( v ){
572                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bold, v );
573                 },
574                 italic : function( v ){
575                         return X.Class._getPrivate( this ).attr( X.Css.Attr.italic, v );
576                 },
577                 lineHeight : function( v ){
578                         return X.Class._getPrivate( this ).attr( X.Css.Attr.lineHeight, v );
579                 },
580                 letterSpacing : function( v ){
581                         return X.Class._getPrivate( this ).attr( X.Css.Attr.letterSpacing, v );
582                 },
583                 wordSpacing : function( v ){
584                         return X.Class._getPrivate( this ).attr( X.Css.Attr.wordSpacing, v );
585                 },
586                 align : function( v ){
587                         return X.Class._getPrivate( this ).attr( X.Css.Attr.align, v );
588                 },
589                 decoration : function( v ){
590                         return X.Class._getPrivate( this ).attr( X.Css.Attr.decoration, v );
591                 },
592                 transform : function( v ){
593                         return X.Class._getPrivate( this ).attr( X.Css.Attr.transform, v );
594                 },
595                 textShadowColor : function( v ){
596                         return X.Class._getPrivate( this ).attr( X.Css.Attr.textShadowColor, v );
597                 },
598                 textShadowOffsetX : function( v ){
599                         return X.Class._getPrivate( this ).attr( X.Css.Attr.textShadowOffsetX, v );
600                 },
601                 textShadowOffsetY : function( v ){
602                         return X.Class._getPrivate( this ).attr( X.Css.Attr.textShadowOffsetY, v );
603                 },
604                 shadowBlur : function( v ){
605                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowBlur, v );
606                 }
607         }
608 );