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