OSDN Git Service

Version 0.6.41, fix for Opera8 & NN7.2+.
[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                                 parent;
175                         
176                         if( elm ){
177                                 // width
178                                 if( isFinite( w ) === true ){
179                                         elm.css( 'width', w + 'px' );
180                                         obj.width   = w;
181                                 } else
182                                 if( isString( w ) === true ){
183                                         obj.width = w;
184                                         elm.css( 'width', w );
185                                         w = elm.width();
186                                 };
187                                 // height
188                                 if( isFinite( h ) === true ){
189                                         elm.css( 'height', h + 'px' );
190                                         obj.height   = h;
191                                 } else
192                                 if( isString( h ) === true ){
193                                         obj.height = h;
194                                         elm.css( 'height', h );
195                                         h = elm.height();
196                                 };
197                                 
198                                 // x
199                                 if( isFinite( x ) === true ){
200                                         elm.css( 'left', x + 'px' );
201                                         obj.left = x;
202                                 } else
203                                 if( isString( x ) === true ){
204                                         obj.left = x;
205                                         elm.css( 'left', x );
206                                         x = elm.x();
207                                 };
208                                 
209                                 // y
210                                 if( isFinite( y ) === true ){
211                                         elm.css( 'top', y + 'px' );
212                                         obj.top   = y;
213                                 } else
214                                 if( isString( y ) === true ){
215                                         obj.top = y;
216                                         elm.css( 'top', y );
217                                         y = elm.y();
218                                 };
219                         };
220                         x = isFinite( x ) === true ? x : data.x;
221                         y = isFinite( y ) === true ? y : data.y;
222                         w = isFinite( w ) === true ? w : data.w;
223                         h = isFinite( h ) === true ? h : data.h;
224                         if( data.x !== x || data.y !== y ){
225                                 data.x = x;
226                                 data.y = y;
227                                 ( parent = data.parentData ) && data.updateAbsoluteXY( parent.absoluteX, parent.absoluteY );
228                                 if( data.w === w && data.h === h ){
229                                         data.updateRectangle();
230                                         4 <= data.phase && data.rootData.reserveCalc();
231                                         return;
232                                 };
233                         };
234                         if( data.w !== w || data.h !== h ){
235                                 data.w = w;
236                                 data.h = h;
237                                 data.updateRectangle();
238                                 4 <= data.phase && data.rootData.reserveCalc();
239                         };
240                         
241                         // ScrollBarManager.update( this );
242                 },
243                 
244                 /*
245                  * opt_unit は getter のみ
246                  */
247                 attr : function( prop, v, opt_unit ){
248                         var update    = prop[ 0 ],
249                                 propID    = prop[ 1 ],
250                                 type      = prop[ 2 ],
251                                 list      = prop[ 3 ],
252                                 length    = !!( type & X.Css.Type.LENGTH    ),
253                                 percent   = !!( type & X.Css.Type.PERCENT   ),
254                                 color     = !!( type & X.Css.Type.COLOR     ),
255                                 uDecimal  = !!( type & X.Css.Type.U_DECIMAL ),
256                                 numerical = !!( type & X.Css.Type.NUMERICAL ),
257                                 flag      = !!( type & X.Css.Type.BOOLEAN   ),
258                                 quartet   = !!( type & X.Css.Type.QUARTET   ),
259                                 url       = !!( type & X.Css.Type.URL       ),
260                                 fontName  = !!( type & X.Css.Type.FONT_NAME ),
261                                 //list      = !!( type & X.Css.Type.LIST      ),
262                                 combi     = !!( type & X.Css.Type.COMBI     ),
263                                 data      = this.data,
264                                 _v        = -1,
265                                 i, l, nodes, root, roots;
266                 /*
267                  * Setter
268                  */
269                         if( v !== undefined ){
270                                 if( Type.isNumber( v ) === true ){
271                                         if( numerical === false ){
272                                                 if( uDecimal === false || v < 0 || 1 < v ){} //throw new Error( '' );
273                                         };
274                                 } else
275                                 if( Type.isBoolean( v ) === true ){
276                                         if( flag === false ){} //throw new Error( '' );
277                                 } else
278                                 if( Type.isString( v ) === true ){
279                                         if( url === false && fontName === false ){
280                                                 if( v.indexOf( ' ' ) !== -1 ){
281                                                         v = v.split( ' ' );
282                                                 } else {
283                                                         if( length === false && percent === false && color === false ){} //throw new Error( '' );
284                                                 };
285                                         };
286                                 };                                      
287                                 if( Type.isArray( v ) === true ){
288                                         if( v.length <= 4 && quartet === true ){
289                                                 type ^= X.Css.Type.QUARTET;
290                                         } else
291                                         if( v.length === 2 && combi === true ){
292                                                 type ^= X.Css.Type.COMBI;
293                                         } else {
294                                                 //throw new Error( '' );
295                                         };
296                                         switch( v.length ){
297                                                 case 1 :
298                                                         this.attr( [ propID  , type, list ], v[ 0 ] );
299                                                         this.attr( [ ++propID, type, list ], v[ 0 ] );
300                                                         this.attr( [ ++propID, type, list ], v[ 0 ] );
301                                                         this.attr( [ ++propID, type, list ], v[ 0 ] );
302                                                         break;
303                                                 case 2 :
304                                                         this.attr( [ propID  , type, list ], v[ 0 ] );
305                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
306                                                         this.attr( [ ++propID, type, list ], v[ 0 ] );
307                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
308                                                         break;
309                                                 case 3 :
310                                                         this.attr( [ propID  , type, list ], v[ 0 ] );
311                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
312                                                         this.attr( [ ++propID, type, list ], v[ 2 ] );
313                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
314                                                         break;
315                                                 case 4 :
316                                                         this.attr( [ propID  , type, list ], v[ 0 ] );
317                                                         this.attr( [ ++propID, type, list ], v[ 1 ] );
318                                                         this.attr( [ ++propID, type, list ], v[ 2 ] );
319                                                         this.attr( [ ++propID, type, list ], v[ 3 ] );
320                                                         break;
321                                                 default :
322                                         };
323                                         return this.User;
324                                 };
325                                 switch( update ){
326                                         case X.Css.Dirty.REFLOW :
327                                                 delete this.layoutCssText;
328                                                 break;
329                                         case X.Css.Dirty.PAINT :
330                                                 delete this.colorCssText;
331                                                 break;
332                                         case X.Css.Dirty.FONT :
333                                                 delete this.fontCssText;
334                                 };
335
336                                 if( this.dirty < update ){
337                                         this.dirty = update;
338                                         roots = this.rootList;
339                                         for( i = 0, l = roots.length; i < l; ++i ){
340                                                 root = roots[ i ];
341                                                 if( root.dirty < update ) root.dirty = update;
342                                         };
343                                 };
344                                 
345                                 if( list ) _v = list.indexOf( v );
346                                 data[ propID ] = _v !== -1 ? _v : v;
347                                 
348                                 switch( propID ){
349                                         case X.Css.AttrNo.left  :
350                                         case X.Css.AttrNo.right :
351                                                 this.constraintW = Type.isNumber( data[ X.Css.AttrNo.left ] ) || Type.isNumber( data[ X.Css.AttrNo.right ] );
352                                                 break;
353                                         case X.Css.AttrNo.top    :
354                                         case X.Css.AttrNo.bottom :
355                                                 this.constraintH = Type.isNumber( data[ X.Css.AttrNo.top ] ) || Type.isNumber( data[ X.Css.AttrNo.bottom ] );
356                                                 break;
357                                         case X.Css.AttrNo.width :
358                                                 this.autoWidth    = v === AUTO;
359                                                 this.percentWidth = v === FULL || v < 1;
360                                                 break;
361                                         case X.Css.AttrNo.height :
362                                                 this.autoHeight    = v === AUTO;
363                                                 this.percentHeight = v === FULL || v < 1;
364                                                 break;
365                                 };                                      
366                                 return this.User;
367                         };
368                 /*
369                  * Getter
370                  */
371                         v = data[ propID ];
372                         // Unit
373                         if( quartet === true ) return [ v, data[ ++propID ], data[ ++propID ], data[ ++propID ] ];
374                         if( combi   === true ) return [ v, data[ ++propID ] ];
375                         if( list && Type.isNumber( v ) === true ) return list[ v ];
376                         return v;
377                 },
378                 __cssText : function(){
379                         if( this.fontCssText   === null ) this.fontCssText   = this.createFontCssText();
380                         if( this.layoutCssText === null ) this.layoutCssText = this.createLayoutCssText();
381                         if( this.colorCssText  === null ) this.colorCssText  = this.createColorCssText();
382                         return [ this.fontCssText, this.colorCssText, this.layoutCssText ].join( ';' );
383                 },
384                 createFontCssText : function(){
385                         var data = this.data,
386                                 css  = [],
387                                 v;
388                         if( v = data[ X.Css.AttrNo.fontFamily    ] ) css[ 0 ] = 'font-family:' + v;
389                         if( v = data[ X.Css.AttrNo.fontSize      ] ) css[ css.length ] = 'font-size:' + v;
390                         if( v = data[ X.Css.AttrNo.bold          ] ) css[ css.length ] = 'font-weight:bold';
391                         if( v = data[ X.Css.AttrNo.italic        ] ) css[ css.length ] = 'font-style:italic';
392                         if( v = data[ X.Css.AttrNo.lineHeight    ] ) css[ css.length ] = 'line-height:' + v;
393                         if( v = data[ X.Css.AttrNo.letterSpacing ] ) css[ css.length ] = 'letter-spacing:' + v;
394                         if( v = data[ X.Css.AttrNo.wordSpacing   ] ) css[ css.length ] = 'word-spacing:' + v;
395                         if( v = data[ X.Css.AttrNo.align         ] ) css[ css.length ] = 'text-align:' + X.Css.Option.ALIGN[ v ];
396                         if( v = data[ X.Css.AttrNo.transform     ] ) css[ css.length ] = 'text-transform:' + X.Css.Option.TEXT_TRANSFORM[ v ];
397                         return css.join( ';' );
398                 },
399                 createLayoutCssText : function(){
400                         
401                 },
402                 createColorCssText : function(){
403                         var data = this.data,
404                                 css  = [],
405                                 v, x, y, c, b;
406                         if( v = data[ X.Css.AttrNo.borderColor ]      ) css[ 0 ] = 'border-color:' + v;
407                         if( v = data[ X.Css.AttrNo.borderStyle + 0 ]  ) css[ css.length ] = 'border-top-style:' + X.Css.Option.BORDER_STYLE[ v ];
408                         if( v = data[ X.Css.AttrNo.borderStyle + 1 ]  ) css[ css.length ] = 'border-right-style:' + X.Css.Option.BORDER_STYLE[ v ];
409                         if( v = data[ X.Css.AttrNo.borderStyle + 2 ]  ) css[ css.length ] = 'border-bottom-style:' + X.Css.Option.BORDER_STYLE[ v ];
410                         if( v = data[ X.Css.AttrNo.borderStyle + 3 ]  ) css[ css.length ] = 'border-left-style:' + X.Css.Option.BORDER_STYLE[ v ];
411                         if( v = data[ X.Css.AttrNo.cornerRadius + 0 ] ) css[ css.length ] = 'corner-radius-top:' + v;
412                         if( v = data[ X.Css.AttrNo.cornerRadius + 1 ] ) css[ css.length ] = 'corner-radius-right:' + v;
413                         if( v = data[ X.Css.AttrNo.cornerRadius + 2 ] ) css[ css.length ] = 'border-radius-bottom:' + v;
414                         if( v = data[ X.Css.AttrNo.cornerRadius + 3 ] ) css[ css.length ] = 'border-radius-left:' + v;
415                         if( v = data[ X.Css.AttrNo.bgColor          ] ) css[ css.length ] = 'background-color:' + v;
416                         // X.Css.AttrNo.bgAlpha
417                         if( v = data[ X.Css.AttrNo.bgImgUrl         ] ) css[ css.length ] = 'background-image:url(' + v + ')';
418                         x = data[ X.Css.AttrNo.bgImgRepeatX ];
419                         y = data[ X.Css.AttrNo.bgImgRepeatY ];
420                         if( x && y ){
421                                 css[ css.length ] = 'background-repeat:repeat';
422                         } else
423                         if( x ){
424                                 css[ css.length ] = 'background-repeat:repeat-x';
425                         } else 
426                         if( y ){
427                                 css[ css.length ] = 'background-repeat:repeat-y';
428                         };
429                         x = data[ X.Css.AttrNo.bgImgPositionX ];
430                         y = data[ X.Css.AttrNo.bgImgPositionY ];
431                         if( x && y ){
432                                 css[ css.length ] = 'background-position:' + x + ' ' + y;
433                         } else
434                         if( x ){
435                                 css[ css.length ] = 'background-position:' + x + ' 0';
436                         } else 
437                         if( y ){
438                                 css[ css.length ] = 'background-position:0 ' + y;
439                         };
440                         if( v = data[ X.Css.AttrNo.color ]      ) css[ css.length ] = 'color:' + v;
441                         if( v = data[ X.Css.AttrNo.decoration ] ) css[ css.length ] = 'text-decoration:' + X.Css.Option.TEXT_DECORATION[ v ];
442                         x = data[ X.Css.AttrNo.textShadowOffsetX ];
443                         y = data[ X.Css.AttrNo.textShadowOffsetY ];
444                         b = data[ X.Css.AttrNo.textShadowBlur ];
445                         c = data[ X.Css.AttrNo.textShadowColor ];
446                         if( c || x || y || b ){
447                                 css[ css.length ] = 'text-shadow:' + x + ' ' + y + ' ' + b + ' ' + c;
448                         };
449                         /*
450                         X.Css.AttrNo.shadowColor    = [ X.Css.Dirty.PAINT,  23, X.Css.Type.COLOR     ]; // color
451                         X.Css.AttrNo.shadowAlpha    = [ X.Css.Dirty.PAINT,  24, X.Css.Type.U_DECIMAL ]; // 0 - 1
452                         X.Css.AttrNo.shadowOffsetX  = [ X.Css.Dirty.PAINT,  25, X.Css.Type.LENGTH    ]; // em
453                         X.Css.AttrNo.shadowOffsetY  = [ X.Css.Dirty.PAINT,  26, X.Css.Type.LENGTH    ]; // em
454                         X.Css.AttrNo.shadowBlur     = [ X.Css.Dirty.PAINT,  27, X.Css.Type.LENGTH    ]; // em
455                         X.Css.AttrNo.shadowSpread   = [ X.Css.Dirty.PAINT,  28, X.Css.Type.LENGTH    ]; // em
456                         X.Css.AttrNo.shadowInset    = [ X.Css.Dirty.PAINT,  29, X.Css.Type.BOOLEAN   ]; // true / false
457                         */
458                         return css.join( ';' );
459                 },
460                 node         : null,
461                 nodeData     : null,
462                 _name        : '',
463                 allow        : null,
464                 _cssText     : null,
465                 _cssObj      : null
466         }
467 );
468
469 var DisplayNodeStyle = X.Class.create(
470         'DisplayNodeStyle',
471         X.Class.FINAL,
472         _DisplayNodeStyle,
473         {
474                 Constructor : function( node, nodeData ){
475                         X.Class._newPrivate( this, node, nodeData );
476                 },
477                 addName : function( names ){
478                         return X.Class._getPrivate( this ).addName( names );
479                 },
480                 removeName : function( names ){
481                         return X.Class._getPrivate( this ).removeName( names );
482                 },
483                 hasName : function( names ){
484                         return X.Class._getPrivate( this ).hasName( names );
485                 },
486                 cssText : function( v ){
487                         var data = X.Class._getPrivate( this );
488                         if( v ){
489                                 data.cssText( v );
490                                 return this;
491                         };
492                         return data._cssText;
493                 },
494                 css : function( v ){
495                         var data = X.Class._getPrivate( this );
496                         if( v ){
497                                 data.css( v );
498                                 return this;
499                         };
500                         // return data._css;
501                 },
502                 
503                 borderWidth : function( v ){
504                         return X.Class._getPrivate( this ).attr( X.Css.Attr.borderWidth, v );
505                 },
506                 borderColor : function( v ){
507                         return X.Class._getPrivate( this ).attr( X.Css.Attr.borderColor, v );
508                 },
509                 borderStyle : function( v ){
510                         return X.Class._getPrivate( this ).attr( X.Css.Attr.borderStyle, v );
511                 },
512                 cornerRadius : function( v ){
513                         return X.Class._getPrivate( this ).attr( X.Css.Attr.cornerRadius, v );
514                 },
515                 bgColor : function( v ){
516                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgColor, v );
517                 },
518                 bgAlpha : function( v ){
519                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgAlpha, v );
520                 },
521                 bgImgUrl : function( v ){
522                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgUrl, v );
523                 },
524                 bgImgRepeatX : function( v ){
525                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgRepeatX, v );
526                 },
527                 bgImgRepeatY : function( v ){
528                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgRepeatY, v );
529                 },
530                 bgImgPositionX : function( v ){
531                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgPositionX, v );
532                 },
533                 bgImgPositionY : function( v ){
534                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bgImgPositionY, v );
535                 },
536                 shadowColor : function( v ){
537                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowColor, v );
538                 },
539                 shadowAlpha : function( v ){
540                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowAlpha, v );
541                 },
542                 shadowOffsetX : function( v ){
543                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowOffsetX, v );
544                 },
545                 shadowOffsetY : function( v ){
546                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowOffsetY, v );
547                 },
548                 shadowBlur : function( v ){
549                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowBlur, v );
550                 },
551                 shadowSpread : function(){
552                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowSpread, v );
553                 },
554                 shadowInset : function(){
555                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowInset, v );
556                 },
557                 color : function( v ){
558                         return X.Class._getPrivate( this ).attr( X.Css.Attr.color, v );
559                 },
560                 fontFamily : function( v ){
561                         return X.Class._getPrivate( this ).attr( X.Css.Attr.fontFamily, v );
562                 },
563                 fontSize : function( v ){
564                         return X.Class._getPrivate( this ).attr( X.Css.Attr.fontSize, v );
565                 },
566                 bold : function( v ){
567                         return X.Class._getPrivate( this ).attr( X.Css.Attr.bold, v );
568                 },
569                 italic : function( v ){
570                         return X.Class._getPrivate( this ).attr( X.Css.Attr.italic, v );
571                 },
572                 lineHeight : function( v ){
573                         return X.Class._getPrivate( this ).attr( X.Css.Attr.lineHeight, v );
574                 },
575                 letterSpacing : function( v ){
576                         return X.Class._getPrivate( this ).attr( X.Css.Attr.letterSpacing, v );
577                 },
578                 wordSpacing : function( v ){
579                         return X.Class._getPrivate( this ).attr( X.Css.Attr.wordSpacing, v );
580                 },
581                 align : function( v ){
582                         return X.Class._getPrivate( this ).attr( X.Css.Attr.align, v );
583                 },
584                 decoration : function( v ){
585                         return X.Class._getPrivate( this ).attr( X.Css.Attr.decoration, v );
586                 },
587                 transform : function( v ){
588                         return X.Class._getPrivate( this ).attr( X.Css.Attr.transform, v );
589                 },
590                 textShadowColor : function( v ){
591                         return X.Class._getPrivate( this ).attr( X.Css.Attr.textShadowColor, v );
592                 },
593                 textShadowOffsetX : function( v ){
594                         return X.Class._getPrivate( this ).attr( X.Css.Attr.textShadowOffsetX, v );
595                 },
596                 textShadowOffsetY : function( v ){
597                         return X.Class._getPrivate( this ).attr( X.Css.Attr.textShadowOffsetY, v );
598                 },
599                 shadowBlur : function( v ){
600                         return X.Class._getPrivate( this ).attr( X.Css.Attr.shadowBlur, v );
601                 }
602         }
603 );