1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 from muntjac.data import property as prop
17
18 from muntjac.data.buffered import IBufferedValidatable
19
20 from muntjac.ui.component import \
21 IFocusable, Event as ComponentEvent
22
23
24 -class IField(IBufferedValidatable, prop.IValueChangeNotifier,
25 prop.IValueChangeListener, prop.IEditor, IFocusable):
26 """@author: Vaadin Ltd.
27 @author: Richard Lincoln
28 """
29
31 """Sets the Caption.
32 """
33 raise NotImplementedError
34
35
37 raise NotImplementedError
38
39
41 """Sets the Description.
42 """
43 raise NotImplementedError
44
45
47 """Is this field required.
48
49 Required fields must filled by the user.
50
51 @return: C{True} if the field is required, otherwise C{False}.
52 """
53 raise NotImplementedError
54
55
57 """Sets the field required. Required fields must filled by the user.
58
59 @param required:
60 Is the field required.
61 """
62 raise NotImplementedError
63
64
66 """Sets the error message to be displayed if a required field is
67 empty.
68
69 @param requiredMessage:
70 Error message.
71 """
72 raise NotImplementedError
73
74
76 """Gets the error message that is to be displayed if a required
77 field is empty.
78
79 @return: Error message.
80 """
81 raise NotImplementedError
82
83
85 """An C{Event} object specifying the IField whose value has
86 been changed.
87
88 @author: Vaadin Ltd.
89 @author: Richard Lincoln
90 @version: 1.1.2
91 """
92
94 """Constructs a new event object with the specified source field
95 object.
96
97 @param source:
98 the field that caused the event.
99 """
100 super(ValueChangeEvent, self).__init__(source)
101
102
104 """Gets the IProperty which triggered the event.
105
106 @return: the Source IProperty of the event.
107 """
108 return self.getSource()
109