|
Lines 17-31
Link Here
|
| 17 |
|
17 |
|
| 18 |
construct : function() { |
18 |
construct : function() { |
| 19 |
this.base( arguments ); |
19 |
this.base( arguments ); |
| 20 |
this.rap_init(); |
20 |
this.rap_init(); |
| 21 |
}, |
21 |
}, |
| 22 |
|
22 |
|
| 23 |
members : { |
23 |
members : { |
| 24 |
rap_init : function() { |
24 |
rap_init : function() { |
|
|
25 |
this._userCursor = null; |
| 25 |
this.addEventListener( "changeFont", this._rwt_onChangeFont, this ); |
26 |
this.addEventListener( "changeFont", this._rwt_onChangeFont, this ); |
| 26 |
this.addEventListener( "changeTextColor", this._rwt_onChangeTextColor, this ); |
27 |
this.addEventListener( "changeTextColor", this._rwt_onChangeTextColor, this ); |
| 27 |
this.addEventListener( "changeBackgroundColor", this._rwt_onChangeBackgoundColor, this ); |
28 |
this.addEventListener( "changeBackgroundColor", this._rwt_onChangeBackgoundColor, this ); |
| 28 |
this.addEventListener( "changeValue", this._rwt_onChangeValue, this ); |
29 |
this.addEventListener( "changeValue", this._rwt_onChangeValue, this ); |
|
|
30 |
this.addEventListener( "changeEditable", this._rwt_onChangeEditable, this ); |
| 29 |
this._popup.addEventListener( "appear", this._rwt_onPopupAppear, this ); |
31 |
this._popup.addEventListener( "appear", this._rwt_onPopupAppear, this ); |
| 30 |
this._popup.addEventListener( "disappear", this._rwt_onPopupDisappear, this ); |
32 |
this._popup.addEventListener( "disappear", this._rwt_onPopupDisappear, this ); |
| 31 |
}, |
33 |
}, |
|
Lines 35-40
Link Here
|
| 35 |
this.removeEventListener( "changeTextColor", this._rwt_onChangeTextColor, this ); |
37 |
this.removeEventListener( "changeTextColor", this._rwt_onChangeTextColor, this ); |
| 36 |
this.removeEventListener( "changeBackgroundColor", this._rwt_onChangeBackgoundColor, this ); |
38 |
this.removeEventListener( "changeBackgroundColor", this._rwt_onChangeBackgoundColor, this ); |
| 37 |
this.removeEventListener( "changeValue", this._rwt_onChangeValue, this ); |
39 |
this.removeEventListener( "changeValue", this._rwt_onChangeValue, this ); |
|
|
40 |
this.removeEventListener( "changeEditable", this._rwt_onChangeEditable, this ); |
| 38 |
this._popup.removeEventListener( "appear", this._rwt_onPopupAppear, this ); |
41 |
this._popup.removeEventListener( "appear", this._rwt_onPopupAppear, this ); |
| 39 |
this._popup.removeEventListener( "disappear", this._rwt_onPopupDisappear, this ); |
42 |
this._popup.removeEventListener( "disappear", this._rwt_onPopupDisappear, this ); |
| 40 |
}, |
43 |
}, |
|
Lines 118-124
Link Here
|
| 118 |
_rwt_onPopupAppear : function( evt ) { |
121 |
_rwt_onPopupAppear : function( evt ) { |
| 119 |
var f = this.getField(); |
122 |
var f = this.getField(); |
| 120 |
f.setReadOnly( true ); |
123 |
f.setReadOnly( true ); |
| 121 |
f.setCursor( "default" ); |
124 |
if( this._userCursor == null ) { |
|
|
125 |
f.setCursor( "default" ); |
| 126 |
} |
| 122 |
f.setSelectable( false ); |
127 |
f.setSelectable( false ); |
| 123 |
}, |
128 |
}, |
| 124 |
|
129 |
|
|
Lines 127-134
Link Here
|
| 127 |
var editable = this.getEditable(); |
132 |
var editable = this.getEditable(); |
| 128 |
var f = this.getField(); |
133 |
var f = this.getField(); |
| 129 |
f.setReadOnly( !editable ); |
134 |
f.setReadOnly( !editable ); |
| 130 |
f.setCursor( editable ? null : "default" ); |
135 |
if( this._userCursor == null ) { |
|
|
136 |
f.setCursor( editable ? null : "default" ); |
| 137 |
} |
| 131 |
f.setSelectable( editable ); |
138 |
f.setSelectable( editable ); |
|
|
139 |
}, |
| 140 |
|
| 141 |
_rwt_onChangeEditable : function( evt ) { |
| 142 |
if( this._userCursor != null ) { |
| 143 |
this.getField().setCursor( this._userCursor ); |
| 144 |
} |
| 145 |
}, |
| 146 |
|
| 147 |
setCursor : function( value ) { |
| 148 |
this._userCursor = value; |
| 149 |
this.getField().setCursor( value ); |
| 150 |
this.getButton().setCursor( value ); |
| 151 |
this.getList().setCursor( value ); |
| 152 |
}, |
| 153 |
|
| 154 |
resetCursor : function() { |
| 155 |
this._userCursor = null; |
| 156 |
this.getField().resetCursor(); |
| 157 |
this.getButton().resetCursor(); |
| 158 |
this.getList().resetCursor(); |
| 132 |
} |
159 |
} |
| 133 |
|
160 |
|
| 134 |
} |
161 |
} |