Mercurial > projects > dwt-win
comparison dwt/custom/CCombo.d @ 315:349b8c12e243
Sync dwt/custom with dwt-linux
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 07 Oct 2008 16:18:26 +0200 |
parents | fd9c62a2998e |
children | da968414c383 |
comparison
equal
deleted
inserted
replaced
314:0e2b4fed7a0f | 315:349b8c12e243 |
---|---|
203 * | 203 * |
204 * @see #add(String,int) | 204 * @see #add(String,int) |
205 */ | 205 */ |
206 public void add (String string) { | 206 public void add (String string) { |
207 checkWidget(); | 207 checkWidget(); |
208 // DWT extension: allow null string | 208 // DWT extension: allow null for zero length string |
209 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); | 209 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); |
210 list.add (string); | 210 list.add (string); |
211 } | 211 } |
212 /** | 212 /** |
213 * Adds the argument to the receiver's list at the given | 213 * Adds the argument to the receiver's list at the given |
231 * | 231 * |
232 * @see #add(String) | 232 * @see #add(String) |
233 */ | 233 */ |
234 public void add (String string, int index) { | 234 public void add (String string, int index) { |
235 checkWidget(); | 235 checkWidget(); |
236 // DWT extension: allow null string | 236 // DWT extension: allow null for zero length string |
237 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); | 237 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); |
238 list.add (string, index); | 238 list.add (string, index); |
239 } | 239 } |
240 /** | 240 /** |
241 * Adds the listener to the collection of listeners who will | 241 * Adds the listener to the collection of listeners who will |
876 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 876 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
877 * </ul> | 877 * </ul> |
878 */ | 878 */ |
879 public int indexOf (String string) { | 879 public int indexOf (String string) { |
880 checkWidget (); | 880 checkWidget (); |
881 // DWT extension: allow null string | 881 // DWT extension: allow null for zero length string |
882 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); | 882 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); |
883 return list.indexOf (string); | 883 return list.indexOf (string); |
884 } | 884 } |
885 /** | 885 /** |
886 * Searches the receiver's list starting at the given, | 886 * Searches the receiver's list starting at the given, |
898 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 898 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
899 * </ul> | 899 * </ul> |
900 */ | 900 */ |
901 public int indexOf (String string, int start) { | 901 public int indexOf (String string, int start) { |
902 checkWidget (); | 902 checkWidget (); |
903 // DWT extension: allow null string | 903 // DWT extension: allow null for zero length string |
904 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); | 904 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); |
905 return list.indexOf (string, start); | 905 return list.indexOf (string, start); |
906 } | 906 } |
907 | 907 |
908 void initAccessible() { | 908 void initAccessible() { |
1242 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 1242 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
1243 * </ul> | 1243 * </ul> |
1244 */ | 1244 */ |
1245 public void remove (String string) { | 1245 public void remove (String string) { |
1246 checkWidget(); | 1246 checkWidget(); |
1247 // DWT extension: allow null string | 1247 // DWT extension: allow null for zero length string |
1248 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); | 1248 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); |
1249 list.remove (string); | 1249 list.remove (string); |
1250 } | 1250 } |
1251 /** | 1251 /** |
1252 * Removes all of the items from the receiver's list and clear the | 1252 * Removes all of the items from the receiver's list and clear the |
1433 * Sets the receiver's list to be the given array of items. | 1433 * Sets the receiver's list to be the given array of items. |
1434 * | 1434 * |
1435 * @param items the array of items | 1435 * @param items the array of items |
1436 * | 1436 * |
1437 * @exception IllegalArgumentException <ul> | 1437 * @exception IllegalArgumentException <ul> |
1438 * <li>ERROR_NULL_ARGUMENT - if the items array is null</li> | |
1439 * <li>ERROR_INVALID_ARGUMENT - if an item in the items array is null</li> | 1438 * <li>ERROR_INVALID_ARGUMENT - if an item in the items array is null</li> |
1440 * </ul> | 1439 * </ul> |
1441 * @exception DWTException <ul> | 1440 * @exception DWTException <ul> |
1442 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 1441 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
1443 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 1442 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
1532 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 1531 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
1533 * </ul> | 1532 * </ul> |
1534 */ | 1533 */ |
1535 public void setText (String string) { | 1534 public void setText (String string) { |
1536 checkWidget(); | 1535 checkWidget(); |
1537 // DWT extension: allow null string | 1536 // DWT extension: allow null for zero length string |
1538 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); | 1537 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); |
1539 int index = list.indexOf (string); | 1538 int index = list.indexOf (string); |
1540 if (index is -1) { | 1539 if (index is -1) { |
1541 list.deselectAll (); | 1540 list.deselectAll (); |
1542 text.setText (string); | 1541 text.setText (string); |