1
2
3
4
5 package org.rcfaces.core.event;
6
7 import javax.faces.component.UIComponent;
8 import javax.faces.event.ActionEvent;
9 import javax.faces.event.FacesListener;
10
11
12
13
14
15 public class DropCompleteEvent extends ActionEvent {
16 private static final long serialVersionUID = 975274504874873948L;
17
18 private static final String REVISION = "$Revision: 1.1 $";
19
20 private final String[] types;
21
22 private final int effect;
23
24 private final Object sourceItemValue;
25
26 private final Object targetItemValue;
27
28 private final UIComponent sourceComponent;
29
30 public DropCompleteEvent(UIComponent targetComponent, Object targetItem,
31 UIComponent sourceComponent, Object sourceItem, int effect,
32 String types[]) {
33
34 super(targetComponent);
35
36 this.targetItemValue = targetItem;
37 this.sourceComponent = sourceComponent;
38 this.sourceItemValue = sourceItem;
39 this.effect = effect;
40 this.types = types;
41 }
42
43 public String[] getTypes() {
44 return types;
45 }
46
47 public int getEffect() {
48 return effect;
49 }
50
51 public Object getSourceItemValue() {
52 return sourceItemValue;
53 }
54
55 public Object getTargetItemValue() {
56 return targetItemValue;
57 }
58
59 public UIComponent getSourceComponent() {
60 return sourceComponent;
61 }
62
63
64
65
66
67
68
69
70 public boolean isAppropriateListener(FacesListener listener) {
71 return (listener instanceof IDropCompleteListener);
72 }
73
74
75
76
77
78
79
80
81 public void processListener(FacesListener listener) {
82 ((IDropCompleteListener) listener).componentCompleteDropped(this);
83 }
84
85 }