Author: abelevich
Date: 2010-12-03 05:53:01 -0500 (Fri, 03 Dec 2010)
New Revision: 20335
Modified:
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropEvent.java
Log:
event according to spec
Modified: sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropEvent.java
===================================================================
---
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropEvent.java 2010-12-03
10:21:47 UTC (rev 20334)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropEvent.java 2010-12-03
10:53:01 UTC (rev 20335)
@@ -22,13 +22,13 @@
package org.richfaces.event;
-import java.util.Set;
-
import javax.faces.component.UIComponent;
-import javax.faces.component.behavior.Behavior;
import javax.faces.event.BehaviorEvent;
import javax.faces.event.FacesListener;
+import org.richfaces.component.behavior.ClientDragBehavior;
+import org.richfaces.component.behavior.ClientDropBehavior;
+
/**
* @author abelevich
*
@@ -36,52 +36,41 @@
public class DropEvent extends BehaviorEvent {
private static final long serialVersionUID = 3717071628237886288L;
-
- private Object dropValue;
- private Object dragValue;
+ private ClientDragBehavior dragSource;
- private Set<String> acceptedTypes;
+ private UIComponent dragComponent;
- private UIComponent dragSource;
-
-
- public DropEvent(UIComponent component, Behavior behavior) {
+ public DropEvent(UIComponent component, ClientDropBehavior behavior) {
super(component, behavior);
}
-
- public Set<String> getAcceptedTypes() {
- return acceptedTypes;
+
+ public ClientDragBehavior getDragSource() {
+ return dragSource;
}
- public void setAcceptedTypes(Set<String> acceptedTypes) {
- this.acceptedTypes = acceptedTypes;
- }
-
- public Object getDropValue() {
- return dropValue;
- }
- public void setDropValue(Object dropValue) {
- this.dropValue = dropValue;
+ public void setDragSource(ClientDragBehavior dragSource) {
+ this.dragSource = dragSource;
}
- public Object getDragValue() {
- return dragValue;
+ public UIComponent getDragComponent() {
+ return dragComponent;
}
- public void setDragValue(Object dragValue) {
- this.dragValue = dragValue;
+ public void setDragComponent(UIComponent dragComponent) {
+ this.dragComponent = dragComponent;
}
- public UIComponent getDragSource() {
- return dragSource;
+ public ClientDropBehavior getDropSource() {
+ return (ClientDropBehavior)getBehavior();
}
-
- public void setDragSource(UIComponent dragSource) {
- this.dragSource = dragSource;
+
+ public UIComponent getDropComponent() {
+ return getComponent();
}
+
@Override
public boolean isAppropriateListener(FacesListener listener) {
return (listener instanceof DropListener);
Show replies by date