| 1 6 package com.nightlabs.ipanema.person.search; 7 8 import org.eclipse.swt.widgets.Composite; 9 import org.eclipse.swt.widgets.Control; 10 11 import com.nightlabs.ipanema.person.AbstractPersonStructField; 12 import com.nightlabs.jdo.search.SearchFilterItem; 13 14 17 public abstract class PersonStructFieldSearchItemEditorHelper implements 18 PersonSearchFilterItemEditorHelper { 19 20 21 protected AbstractPersonStructField personStructField; 22 23 24 protected PersonStructFieldSearchItemEditorHelper() { 25 super(); 26 } 27 28 34 public PersonStructFieldSearchItemEditorHelper(AbstractPersonStructField _personStructField) { 35 super(); 36 init(_personStructField); 37 } 38 39 40 public void init(AbstractPersonStructField personStructField) { 41 this.personStructField = personStructField; 42 } 43 44 47 public abstract Control getControl(Composite parent); 48 49 52 public abstract SearchFilterItem getSearchFilterItem(); 53 54 57 public PersonSearchFilterItemEditorHelper newInstance() { 58 PersonStructFieldSearchItemEditorHelper result; 59 try { 60 result = (PersonStructFieldSearchItemEditorHelper)this.getClass().newInstance(); 61 } catch (Throwable t) { 62 IllegalStateException ill = new IllegalStateException ("Error instatiating new PersonStructFieldSearchItemEditorHelper "+this); 63 ill.initCause(t); 64 throw ill; 65 } 66 result.init(this.personStructField); 67 return result; 68 } 69 70 73 public String getDisplayName() { 74 return personStructField.getPersonStructBlockID()+": "+personStructField.getPersonStructFieldID(); 75 } 76 77 } 78 | Popular Tags |