Changeset 212:ab60f3309436 for dwt/custom/CCombo.d
- Timestamp:
- 05/04/08 18:12:38 (7 months ago)
- Files:
-
- dwt/custom/CCombo.d (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/custom/CCombo.d
r194 r212 197 197 * @see #add(String,int) 198 198 */ 199 public void add ( char[]string) {199 public void add (String string) { 200 200 checkWidget(); 201 201 if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); … … 225 225 * @see #add(String) 226 226 */ 227 public void add ( char[]string, int index) {227 public void add (String string, int index) { 228 228 checkWidget(); 229 229 if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); … … 377 377 checkWidget (); 378 378 int width = 0, height = 0; 379 char[][] items = list.getItems ();379 String[] items = list.getItems (); 380 380 GC gc = new GC (text); 381 381 int spacer = gc.stringExtent (" ").x; //$NON-NLS-1$ … … 413 413 text.copy (); 414 414 } 415 void createPopup( char[][] items, int selectionIndex) {415 void createPopup(String[] items, int selectionIndex) { 416 416 // create shell and list 417 417 popup = new Shell (getShell (), DWT.NO_TRIM | DWT.ON_TOP); … … 497 497 498 498 if (getShell() !is popup.getParent ()) { 499 char[][] items = list.getItems ();499 String[] items = list.getItems (); 500 500 int selectionIndex = list.getSelectionIndex (); 501 501 list.removeListener (DWT.Dispose, listener); … … 535 535 * characters in the given string, return '\0'. 536 536 */ 537 dchar _findMnemonic ( char[]string) {537 dchar _findMnemonic (String string) { 538 538 if (string is null) return '\0'; 539 539 int index = 0; … … 603 603 * </ul> 604 604 */ 605 public char[]getItem (int index) {605 public String getItem (int index) { 606 606 checkWidget(); 607 607 return list.getItem (index); … … 652 652 * </ul> 653 653 */ 654 public char[][] getItems () {654 public String [] getItems () { 655 655 checkWidget (); 656 656 return list.getItems (); … … 709 709 * </ul> 710 710 */ 711 public char[]getText () {711 public String getText () { 712 712 checkWidget (); 713 713 return text.getText (); … … 811 811 * </ul> 812 812 */ 813 public int indexOf ( char[]string) {813 public int indexOf (String string) { 814 814 checkWidget (); 815 815 if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); … … 835 835 * </ul> 836 836 */ 837 public int indexOf ( char[]string, int start) {837 public int indexOf (String string, int start) { 838 838 checkWidget (); 839 839 if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); … … 844 844 AccessibleAdapter accessibleAdapter = new class() AccessibleAdapter { 845 845 public void getName (AccessibleEvent e) { 846 char[]name = null;846 String name = null; 847 847 Label label = getAssociatedLabel (); 848 848 if (label !is null) { … … 852 852 } 853 853 public void getKeyboardShortcut(AccessibleEvent e) { 854 char[]shortcut = null;854 String shortcut = null; 855 855 Label label = getAssociatedLabel (); 856 856 if (label !is null) { 857 char[]text = label.getText ();857 String text = label.getText (); 858 858 if (text !is null) { 859 859 dchar mnemonic = _findMnemonic (text); … … 965 965 case DWT.Dispose: 966 966 if (getShell () !is popup.getParent ()) { 967 char[][] items = list.getItems ();967 String[] items = list.getItems (); 968 968 int selectionIndex = list.getSelectionIndex (); 969 969 popup = null; … … 1171 1171 * </ul> 1172 1172 */ 1173 public void remove ( char[]string) {1173 public void remove (String string) { 1174 1174 checkWidget(); 1175 1175 if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); … … 1353 1353 * </ul> 1354 1354 */ 1355 public void setItem (int index, char[]string) {1355 public void setItem (int index, String string) { 1356 1356 checkWidget(); 1357 1357 list.setItem (index, string); … … 1371 1371 * </ul> 1372 1372 */ 1373 public void setItems ( char[][] items) {1373 public void setItems (String [] items) { 1374 1374 checkWidget (); 1375 1375 list.setItems (items); … … 1441 1441 * </ul> 1442 1442 */ 1443 public void setText ( char[]string) {1443 public void setText (String string) { 1444 1444 checkWidget(); 1445 1445 if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); … … 1474 1474 } 1475 1475 1476 public override void setToolTipText ( char[]string) {1476 public override void setToolTipText (String string) { 1477 1477 checkWidget(); 1478 1478 super.setToolTipText(string); … … 1508 1508 visibleItemCount = count; 1509 1509 } 1510 char[] stripMnemonic (char[]string) {1510 String stripMnemonic (String string) { 1511 1511 int index = 0; 1512 1512 int length_ = string.length;
