1 11 package org.eclipse.jface.internal.databinding.internal.swt; 12 13 import org.eclipse.jface.databinding.swt.SWTObservables; 14 import org.eclipse.swt.widgets.Combo; 15 16 20 public class ComboObservableList extends SWTObservableList { 21 22 private final Combo combo; 23 24 27 public ComboObservableList(Combo combo) { 28 super(SWTObservables.getRealm(combo.getDisplay())); 29 this.combo = combo; 30 } 31 32 protected int getItemCount() { 33 return combo.getItemCount(); 34 } 35 36 protected void setItems(String [] newItems) { 37 combo.setItems(newItems); 38 } 39 40 protected String [] getItems() { 41 return combo.getItems(); 42 } 43 44 protected String getItem(int index) { 45 return combo.getItem(index); 46 } 47 48 protected void setItem(int index, String string) { 49 combo.setItem(index, string); 50 } 51 } 52 | Popular Tags |