1 6 package com.nightlabs.ipanema.person.search; 7 8 import java.util.Collection ; 9 10 import org.eclipse.jface.viewers.IStructuredContentProvider; 11 import org.eclipse.jface.viewers.Viewer; 12 13 20 public class PersonSearchResultTableContentProvider implements IStructuredContentProvider{ 21 22 27 public Object [] getElements(Object inputElement) { 28 if (inputElement instanceof Collection ) { 29 Object [] result = ((Collection )inputElement).toArray(); 30 34 return result; 35 } 36 else 37 throw new IllegalArgumentException ("InputElement should be a collection but is "+inputElement.getClass().getName()); 38 39 } 40 41 44 public void dispose() { 45 } 46 47 50 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 51 } 52 53 } 54 | Popular Tags |