1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 """A compound criterion that accepts the drag if any of its criterion
17 accepts it."""
18
19 from muntjac.event.dd.acceptcriteria.client_side_criterion import \
20 ClientSideCriterion
21
22
23 -class Or(ClientSideCriterion):
24 """A compound criterion that accepts the drag if any of its criterion
25 accepts it.
26
27 @see: And
28 """
29
31 """@param criteria:
32 the criteria of which the Or criteria will be composed
33 """
34 self._criteria = criteria
35
36
37 - def paintContent(self, target):
38 super(Or, self).paintContent(target)
39 for crit in self._criteria:
40 crit.paint(target)
41
42
44 for crit in self._criteria:
45 if crit.accept(dragEvent):
46 return True
47 return False
48
49
51 return 'com.vaadin.event.dd.acceptcriteria.Or'
52