|
Lines 46-52
Link Here
|
| 46 |
this._list = new qx.ui.form.List(); |
46 |
this._list = new qx.ui.form.List(); |
| 47 |
this._list.setAppearance( "combo-list" ); |
47 |
this._list.setAppearance( "combo-list" ); |
| 48 |
this._list.setTabIndex( -1 ); |
48 |
this._list.setTabIndex( -1 ); |
| 49 |
this._list.setVisibility( false ); |
49 |
this._list.setDisplay( false ); |
| 50 |
// List Manager |
50 |
// List Manager |
| 51 |
this._manager = this._list.getManager(); |
51 |
this._manager = this._list.getManager(); |
| 52 |
this._manager.setMultiSelection( false ); |
52 |
this._manager.setMultiSelection( false ); |
|
Lines 126-132
Link Here
|
| 126 |
members : { |
126 |
members : { |
| 127 |
_onChangeSize : function( evt ) { |
127 |
_onChangeSize : function( evt ) { |
| 128 |
this._list.setWidth( this.getWidth() ); |
128 |
this._list.setWidth( this.getWidth() ); |
| 129 |
this._listPositioning(); |
129 |
this._setListLocation(); |
| 130 |
}, |
130 |
}, |
| 131 |
|
131 |
|
| 132 |
_onAppear : function( evt ) { |
132 |
_onAppear : function( evt ) { |
|
Lines 141-146
Link Here
|
| 141 |
this._list.addState( "rwt_FLAT" ); |
141 |
this._list.addState( "rwt_FLAT" ); |
| 142 |
} |
142 |
} |
| 143 |
this.getTopLevelWidget().add( this._list ); |
143 |
this.getTopLevelWidget().add( this._list ); |
|
|
144 |
this._setListLocation(); |
| 144 |
}, |
145 |
}, |
| 145 |
|
146 |
|
| 146 |
_onFocusIn : function( evt ) { |
147 |
_onFocusIn : function( evt ) { |
|
Lines 223-231
Link Here
|
| 223 |
this._toggleListVisibility(); |
224 |
this._toggleListVisibility(); |
| 224 |
} |
225 |
} |
| 225 |
}, |
226 |
}, |
| 226 |
|
227 |
|
|
|
228 |
/////////////////////////////////////// |
| 227 |
// List and list-items handling methods |
229 |
// List and list-items handling methods |
| 228 |
_listPositioning : function() { |
230 |
|
|
|
231 |
_setListLocation : function() { |
| 229 |
if( this.getElement() ){ |
232 |
if( this.getElement() ){ |
| 230 |
var elementPos = qx.bom.element.Location.get( this.getElement() ); |
233 |
var elementPos = qx.bom.element.Location.get( this.getElement() ); |
| 231 |
this._list.setLocation( elementPos.left, |
234 |
this._list.setLocation( elementPos.left, |
|
Lines 234-240
Link Here
|
| 234 |
}, |
237 |
}, |
| 235 |
|
238 |
|
| 236 |
_toggleListVisibility : function() { |
239 |
_toggleListVisibility : function() { |
| 237 |
this._listPositioning(); |
|
|
| 238 |
if( this._list.getChildrenLength() ) { |
240 |
if( this._list.getChildrenLength() ) { |
| 239 |
// Temporary make the text field ReadOnly, when the list is dropped. |
241 |
// Temporary make the text field ReadOnly, when the list is dropped. |
| 240 |
if( this._editable ) { |
242 |
if( this._editable ) { |
|
Lines 244-253
Link Here
|
| 244 |
// Brings this widget on top of the others with same parent. |
246 |
// Brings this widget on top of the others with same parent. |
| 245 |
this._bringToFront(); |
247 |
this._bringToFront(); |
| 246 |
this.setCapture( true ); |
248 |
this.setCapture( true ); |
|
|
249 |
this._setListLocation(); |
| 247 |
} else { |
250 |
} else { |
| 248 |
this.setCapture( false ); |
251 |
this.setCapture( false ); |
| 249 |
} |
252 |
} |
| 250 |
this._list.setVisibility( !this._dropped ); |
253 |
this._list.setDisplay( !this._dropped ); |
| 251 |
this._dropped = !this._dropped; |
254 |
this._dropped = !this._dropped; |
| 252 |
if( this.hasState( "rwt_CCOMBO" ) ) { |
255 |
if( this.hasState( "rwt_CCOMBO" ) ) { |
| 253 |
this._updateListVisibleRequestParam(); |
256 |
this._updateListVisibleRequestParam(); |
|
Lines 597-603
Link Here
|
| 597 |
var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); |
600 |
var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); |
| 598 |
var req = org.eclipse.swt.Request.getInstance(); |
601 |
var req = org.eclipse.swt.Request.getInstance(); |
| 599 |
var id = widgetManager.findIdByWidget( this ); |
602 |
var id = widgetManager.findIdByWidget( this ); |
| 600 |
req.addParameter( id + ".listVisible", this._list.getVisibility() ); |
603 |
req.addParameter( id + ".listVisible", this._list.getDisplay() ); |
| 601 |
} |
604 |
} |
| 602 |
}, |
605 |
}, |
| 603 |
|
606 |
|
|
Lines 675-681
Link Here
|
| 675 |
}, |
678 |
}, |
| 676 |
|
679 |
|
| 677 |
setListVisible : function( value ) { |
680 |
setListVisible : function( value ) { |
| 678 |
if( this._list.setVisibility != value ) { |
681 |
if( this._list.getDisplay() != value ) { |
| 679 |
this._dropped = !value; |
682 |
this._dropped = !value; |
| 680 |
this._toggleListVisibility(); |
683 |
this._toggleListVisibility(); |
| 681 |
} |
684 |
} |