KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > ipanema > person > edit > PersonDataFieldEditor


1 /*
2  * Created on Nov 26, 2004
3  * by alex
4  *
5  */

6 package com.nightlabs.ipanema.person.edit;
7
8 import org.eclipse.swt.widgets.Composite;
9 import org.eclipse.swt.widgets.Control;
10
11 import com.nightlabs.ipanema.person.AbstractPersonDataField;
12
13
14 /**
15  * @author Alexander Bieber <alex[AT]nightlabs[DOT]de>
16  */

17 public interface PersonDataFieldEditor {
18     
19     public void setPersonDataFieldEditorFactory(PersonDataFieldEditorFactory factory);
20     public PersonDataFieldEditorFactory getPersonDataFieldEditorFactory();
21     
22     /**
23      * Here a data field editor should add its
24      * control to a parent composite.<br/>
25      * The Composite returned should be a singelton
26      * and be updated with data changes.
27      * No data-display will be made here. See {@link #setData(AbstractPersonDataField)}.
28      *
29      * @param parent
30      * @return
31      */

32     public Control createControl(Composite parent);
33     /**
34      * Should return the Control created in {@link #createControl(Composite)}.
35      * @return the Control created in {@link #createControl(Composite)}.
36      */

37     public Control getControl();
38     
39     /**
40      * Editors should refresh their data during this method.
41      * The composite should be refreshed as well.
42      * @param data
43      */

44     public void setData(AbstractPersonDataField data);
45     
46     public void refresh();
47     
48     public void updatePerson();
49     
50     
51     public void addDataFieldEditorChangedListener(DataFieldEditorChangeListener listener);
52     public void removeDataFieldEditorChangedListener(DataFieldEditorChangeListener listener);
53     public void setChanged(boolean changed);
54     public boolean isChanged();
55     
56 }
57
Popular Tags