|
Lines 65-71
Link Here
|
| 65 |
this.addEventListener( "changeFont", this._onChangeFont, this ); |
65 |
this.addEventListener( "changeFont", this._onChangeFont, this ); |
| 66 |
this.addEventListener( "changeTextColor", this._onChangeTextColor, this ); |
66 |
this.addEventListener( "changeTextColor", this._onChangeTextColor, this ); |
| 67 |
this.addEventListener( "changeBackgroundColor", |
67 |
this.addEventListener( "changeBackgroundColor", |
| 68 |
this._onChangeBackgoundColor, |
68 |
this._onChangeBackgroundColor, |
| 69 |
this ); |
69 |
this ); |
| 70 |
this.addEventListener( "changeVisibility", this._onChangeVisibility, this ); |
70 |
this.addEventListener( "changeVisibility", this._onChangeVisibility, this ); |
| 71 |
// Mouse events |
71 |
// Mouse events |
|
Lines 95-101
Link Here
|
| 95 |
this.removeEventListener( "changeFont", this._onChangeFont, this ); |
95 |
this.removeEventListener( "changeFont", this._onChangeFont, this ); |
| 96 |
this.removeEventListener( "changeTextColor", this._onChangeTextColor, this ); |
96 |
this.removeEventListener( "changeTextColor", this._onChangeTextColor, this ); |
| 97 |
this.removeEventListener( "changeBackgroundColor", |
97 |
this.removeEventListener( "changeBackgroundColor", |
| 98 |
this._onChangeBackgoundColor, |
98 |
this._onChangeBackgroundColor, |
| 99 |
this ); |
99 |
this ); |
| 100 |
this.removeEventListener( "changeVisibility", this._onChangeVisibility, this ); |
100 |
this.removeEventListener( "changeVisibility", this._onChangeVisibility, this ); |
| 101 |
this.removeEventListener( "mousedown", this._onMouseDown, this ); |
101 |
this.removeEventListener( "mousedown", this._onMouseDown, this ); |
|
Lines 126-131
Link Here
|
| 126 |
}, |
126 |
}, |
| 127 |
|
127 |
|
| 128 |
members : { |
128 |
members : { |
|
|
129 |
|
| 130 |
addState : function( state ) { |
| 131 |
this.base( arguments, state ); |
| 132 |
if( state.substr( 0, 8 ) == "variant_" ) { |
| 133 |
this._field.addState( state ); |
| 134 |
this._list.addState( state ); |
| 135 |
} |
| 136 |
}, |
| 137 |
|
| 138 |
removeState : function( state ) { |
| 139 |
this.base( arguments, state ); |
| 140 |
if( state.substr( 0, 8 ) == "variant_" ) { |
| 141 |
this._field.removeState( state ); |
| 142 |
this._list.removeState( state ); |
| 143 |
} |
| 144 |
}, |
| 145 |
|
| 129 |
_onChangeSize : function( evt ) { |
146 |
_onChangeSize : function( evt ) { |
| 130 |
this._list.setWidth( this.getWidth() ); |
147 |
this._list.setWidth( this.getWidth() ); |
| 131 |
this._setListLocation(); |
148 |
this._setListLocation(); |
|
Lines 180-189
Link Here
|
| 180 |
this._list.setTextColor( value ); |
197 |
this._list.setTextColor( value ); |
| 181 |
}, |
198 |
}, |
| 182 |
|
199 |
|
| 183 |
_onChangeBackgoundColor : function( evt ) { |
200 |
_onChangeBackgroundColor : function( evt ) { |
| 184 |
var value = evt.getValue(); |
201 |
var color = evt.getValue(); |
| 185 |
this._field.setBackgroundColor( value ); |
202 |
this._field.setBackgroundColor( color ); |
| 186 |
this._list.setBackgroundColor( value ); |
203 |
if( color != null ) { |
|
|
204 |
this._list.setBackgroundColor( color ); |
| 205 |
} else { |
| 206 |
this._list.resetBackgroundColor(); |
| 207 |
} |
| 187 |
}, |
208 |
}, |
| 188 |
|
209 |
|
| 189 |
_onChangeVisibility : function( evt ) { |
210 |
_onChangeVisibility : function( evt ) { |