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