comparison org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboObservableList.d @ 78:0a55d2d5a946

Added file for databinding
author Frank Benoit <benoit@tionex.de>
date Tue, 14 Apr 2009 11:35:29 +0200
parents
children 6be48cf9f95c
comparison
equal deleted inserted replaced
76:f05e6e8b2f2d 78:0a55d2d5a946
1 /*******************************************************************************
2 * Copyright (c) 2005, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 module org.eclipse.jface.internal.databinding.swt.CComboObservableList;
12
13 import java.lang.all;
14
15 import org.eclipse.jface.databinding.swt.SWTObservables;
16 import org.eclipse.swt.custom.CCombo;
17
18 /**
19 * @since 3.2
20 *
21 */
22 public class CComboObservableList : SWTObservableList {
23
24 private final CCombo ccombo;
25
26 /**
27 * @param ccombo
28 */
29 public this(CCombo ccombo) {
30 super(SWTObservables.getRealm(ccombo.getDisplay()));
31 this.ccombo = ccombo;
32 }
33
34 protected int getItemCount() {
35 return ccombo.getItemCount();
36 }
37
38 protected void setItems(String[] newItems) {
39 ccombo.setItems(newItems);
40 }
41
42 protected String[] getItems() {
43 return ccombo.getItems();
44 }
45
46 protected String getItem(int index) {
47 return ccombo.getItem(index);
48 }
49
50 protected void setItem(int index, String string) {
51 ccombo.setItem(index, string);
52 }
53 }