1
|
package eu.etaxonomy.taxeditor.ui.element;
|
2
|
|
3
|
|
4
|
import java.util.List;
|
5
|
import java.util.Set;
|
6
|
|
7
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
8
|
import org.eclipse.swt.graphics.Color;
|
9
|
import org.eclipse.swt.widgets.Composite;
|
10
|
import org.eclipse.swt.widgets.Control;
|
11
|
|
12
|
|
13
|
/**
|
14
|
* <p>ICdmFormElement interface.</p>
|
15
|
*
|
16
|
* @author n.hoffmann
|
17
|
* @version $Id: $
|
18
|
*/
|
19
|
public interface ICdmFormElement extends IPropertyChangeEmitter, IPropertyChangeListener {
|
20
|
|
21
|
/**
|
22
|
* <p>getPropertyChangeListeners</p>
|
23
|
*
|
24
|
* @return a {@link java.util.Set} object.
|
25
|
*/
|
26
|
public abstract List<IPropertyChangeListener> getPropertyChangeListeners();
|
27
|
|
28
|
/**
|
29
|
* <p>setPropertyChangeListeners</p>
|
30
|
*
|
31
|
* @param propertyChangeListeners a {@link java.util.Set} object.
|
32
|
*/
|
33
|
public abstract void setPropertyChangeListeners(
|
34
|
List<IPropertyChangeListener> propertyChangeListeners);
|
35
|
|
36
|
/**
|
37
|
* <p>getControls</p>
|
38
|
*
|
39
|
* @return a {@link java.util.Set} object.
|
40
|
*/
|
41
|
public abstract Set<Control> getControls();
|
42
|
|
43
|
/**
|
44
|
* <p>getElements</p>
|
45
|
*
|
46
|
* @return a {@link java.util.Set} object.
|
47
|
*/
|
48
|
public abstract Set<ICdmFormElement> getElements();
|
49
|
|
50
|
/**
|
51
|
* <p>addElement</p>
|
52
|
*
|
53
|
* @param element a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
|
54
|
*/
|
55
|
public abstract void addElement(ICdmFormElement element);
|
56
|
|
57
|
/**
|
58
|
* <p>getParentElement</p>
|
59
|
*
|
60
|
* @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
|
61
|
*/
|
62
|
public abstract ICdmFormElement getParentElement();
|
63
|
|
64
|
/**
|
65
|
* <p>removeElements</p>
|
66
|
*/
|
67
|
public abstract void removeElements();
|
68
|
|
69
|
/**
|
70
|
* <p>getLayoutComposite</p>
|
71
|
*
|
72
|
* @return a {@link org.eclipse.swt.widgets.Composite} object.
|
73
|
*/
|
74
|
public abstract Composite getLayoutComposite();
|
75
|
|
76
|
/**
|
77
|
* <p>containsFormElement</p>
|
78
|
*
|
79
|
* @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
|
80
|
* @return a boolean.
|
81
|
*/
|
82
|
public boolean containsFormElement(ICdmFormElement formElement);
|
83
|
|
84
|
/**
|
85
|
* <p>setBackground</p>
|
86
|
*
|
87
|
* @param color a {@link org.eclipse.swt.graphics.Color} object.
|
88
|
*/
|
89
|
public void setBackground(Color color);
|
90
|
|
91
|
/**
|
92
|
* Sets a background color for this element and stores this background color
|
93
|
* for future reference
|
94
|
*
|
95
|
* @param color
|
96
|
*/
|
97
|
public void setPersistentBackground(Color color);
|
98
|
|
99
|
/**
|
100
|
* Get the background color that is associated with this element.
|
101
|
*
|
102
|
* @return
|
103
|
*/
|
104
|
public Color getPersistentBackground();
|
105
|
|
106
|
/**
|
107
|
* Refreshes the layout of this form element.
|
108
|
*
|
109
|
* This method should be called when the content of the form element
|
110
|
* changes and the current element needs to display that changes
|
111
|
*/
|
112
|
public void refresh();
|
113
|
|
114
|
/**
|
115
|
* <p>Getter for the field <code>formFactory</code>.</p>
|
116
|
*
|
117
|
* @return a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
|
118
|
*/
|
119
|
public CdmFormFactory getFormFactory();
|
120
|
}
|