Author: abelevich
Date: 2010-11-18 09:37:57 -0500 (Thu, 18 Nov 2010)
New Revision: 20086
Added:
sandbox/trunk/ui/drag-drop/api/
sandbox/trunk/ui/drag-drop/api/pom.xml
sandbox/trunk/ui/drag-drop/api/src/
sandbox/trunk/ui/drag-drop/api/src/main/
sandbox/trunk/ui/drag-drop/api/src/main/java/
sandbox/trunk/ui/drag-drop/api/src/main/java/org/
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/Draggable.java
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/Dropzone.java
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DnDEvent.java
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DragEvent.java
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DragListener.java
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/DropListener.java
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropSource.java
Log:
initial commit api
Added: sandbox/trunk/ui/drag-drop/api/pom.xml
===================================================================
--- sandbox/trunk/ui/drag-drop/api/pom.xml (rev 0)
+++ sandbox/trunk/ui/drag-drop/api/pom.xml 2010-11-18 14:37:57 UTC (rev 20086)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, Red Hat,
+ Inc. and individual contributors by the @authors tag. See the
+ copyright.txt in the distribution for a full listing of
+ individual contributors. This is free software; you can
+ redistribute it and/or modify it under the terms of the GNU
+ Lesser General Public License as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your
+ option) any later version. This software is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without
+ even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ for more details. You should have received a copy of the GNU
+ Lesser General Public License along with this software; if not,
+ write to the Free Software Foundation, Inc., 51 Franklin St,
+ Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
+
http://www.fsf.org.
+-->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.richfaces.ui.dnd</groupId>
+ <artifactId>richfaces-ui-dnd-api</artifactId>
+ <name>Richfaces UI Components: DND UI</name>
+ <packaging>jar</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+
<suppressionsLocation>${project.basedir}/richfaces-suppressions.xml</suppressionsLocation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <scm>
+
<
connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/ui/o...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trun...
+ <
url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+
+</project>
\ No newline at end of file
Added:
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/Draggable.java
===================================================================
--- sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/Draggable.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/Draggable.java 2010-11-18
14:37:57 UTC (rev 20086)
@@ -0,0 +1,131 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.event.DragListener;
+
+
+/**
+ * Interface for all draggable components. Describe bean properties, implemented by
component.
+ * @author shura
+ *
+ */
+public interface Draggable {
+
+ /**
+ * Getter for value parameter, used as key for draggable component.
+ * @return
+ */
+ public Object getDragValue();
+
+ public void setDragValue(Object value);
+
+ /**
+ * Getter for id of component ( instance of {@link UIDragIndicator} ) used for create
drag cursor.
+ * @return
+ */
+ public String getDragIndicator();
+
+ /**
+ * @param dragIndicator - id of cursor component
+ */
+ public void setDragIndicator(String dragIndicator);
+
+ /**
+ * Draggable implementation may wish to resolve drag indicator id to clientId itself
+ * @param facesContext {@link FacesContext} instance
+ * @return resolved indicator client id or null
+ * @since 3.1
+ */
+ public String getResolvedDragIndicator(FacesContext facesContext);
+
+ /**
+ * Getter for type of this draggable ( file, mail etc ).
+ * @return
+ */
+ public String getDragType();
+
+ /**
+ * @param dragType
+ */
+ public void setDragType(String dragType);
+
+ /**
+ * Getter for JavaScript event handler, called before start drag operation.
+ * If this handler return false, drag operation is cancelled.
+ * @return javaScript code of event handler.
+ */
+ public String getOndragstart();
+
+ /**
+ * @param dragType
+ */
+ public void setOndragstart(String ondrag);
+
+ /**
+ * Getter for JavaScript event handler; Called when drag operation end.
+ * @return javaScript code of event handler.
+ */
+ public String getOndragend();
+ public void setOndragend(String ondrag);
+
+ /**
+ * Getter for JavaScript event handler; Called when dragged element over the dropzone.
+ * @return javaScript code of event handler.
+ */
+ public String getOndropover();
+ public void setOndropover(String ondropover);
+
+ /**
+ * Getter for JavaScript event handler; Called when dragged element out the dropzone.
+ * @return javaScript code of event handler.
+ */
+ public String getOndropout();
+ public void setOndropout(String ondropout);
+
+ /**
+ * Append drag listener to component listeners collection
+ * @param listener
+ */
+ public void addDragListener(DragListener listener);
+
+ /**
+ * Get array of all Drop Listeners
+ * @return
+ */
+ public DragListener[] getDragListeners();
+
+ /**
+ * Remove drop listener from component listeners array.
+ * @param listener
+ */
+ public void removeDragListener(DragListener listener);
+
+ public String getGrabCursors();
+ public void setGrabCursors(String grabCursors);
+
+ public String getGrabbingCursors();
+ public void setGrabbingCursors(String grabbingCursors);
+
+}
Added: sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/Dropzone.java
===================================================================
--- sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/Dropzone.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/component/Dropzone.java 2010-11-18
14:37:57 UTC (rev 20086)
@@ -0,0 +1,122 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import org.richfaces.event.DropSource;
+
+/**
+ * Base interface for all components, accesible as drop zone.
+ * @author shura
+ *
+ */
+public interface Dropzone extends DropSource {
+
+ /**
+ * Getter for dropType's , accepted by this zone.
+ * @return
+ */
+ public Object getAcceptedTypes();
+
+ public void setAcceptedTypes(Object types);
+
+ /**
+ * Getter for mapping between drop types and indicator states.
+ * @return
+ */
+ public Object getTypeMapping();
+
+ public void setTypeMapping(Object types);
+
+
+ /**
+ * Getter for mapping between drop types and acceptable cursors
+ * @return
+ */
+ public Object getCursorTypeMapping();
+ public void setCursorTypeMapping(Object types);
+
+ /**
+ * Getter for JavaScript event handler, called then drag curcor enter in component
area.
+ * If this handler return false, or "declined", drop operation on this
component not allowed.
+ * If handler return true or "allowed" , or any other supported indicator
states, drop operation
+ * is allowed and corresponding indicator state will be displayed.
+ * @return javaScript code of event handler.
+ */
+ public String getOndragenter();
+
+ /**
+ * @param dragType
+ */
+ public void setOndragenter(String ondrag);
+
+ /**
+ * Getter for JavaScript event handler, called before drag cursor leave component
area.
+ * @return javaScript code of event handler.
+ */
+ public String getOndragexit();
+
+ /**
+ * @param dragType
+ */
+ public void setOndragexit(String ondrag);
+
+ public Object getDropValue();
+
+ public void setDropValue(Object o);
+
+ /**
+ * Javascript code called before drop event.
+ * @parameter
+ * @return the acceptClass
+ */
+ public abstract String getOndrop();
+
+ /**
+ * @param newOndrop the value to set
+ */
+ public abstract void setOndrop(String newOndrop);
+
+ /**
+ * Javascript handler for event fired on drop even the drop for given type is not
available
+ * @parameter
+ * @return the acceptClass
+ */
+ public abstract String getOndropend();
+
+ /**
+ * @param newname the value to set
+ */
+ public abstract void setOndropend(String ondropend);
+
+ /**
+ * Getter for the list of comma separated cursors that indicates when acceptable
draggable over dropzone
+ */
+ public String getAcceptCursors();
+ public void setAcceptCursors(String acceptCursors);
+
+ /**
+ * Getter for the list of comma separated cursors that indicates when rejectable
draggable over dropzone
+ */
+ public String getRejectCursors();
+ public void setRejectCursors(String rejectCursors);
+
+}
Added: sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DnDEvent.java
===================================================================
--- sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DnDEvent.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DnDEvent.java 2010-11-18
14:37:57 UTC (rev 20086)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+
+/**
+ *
+ * <br /><br />
+ *
+ * Created 12.11.2007
+ * @author Nick Belaevski
+ * @since 3.2
+ */
+
+public abstract class DnDEvent extends FacesEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2455016405742082110L;
+
+ public DnDEvent(UIComponent component) {
+ super(component);
+ }
+
+}
Added: sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DragEvent.java
===================================================================
--- sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DragEvent.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DragEvent.java 2010-11-18
14:37:57 UTC (rev 20086)
@@ -0,0 +1,102 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesListener;
+
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 27.12.2006
+ *
+ */
+public class DragEvent extends DnDEvent {
+
+ private Dropzone dropTarget;
+ private Object acceptedTypes;
+ private Object dropValue;
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6179268394391836905L;
+
+ public DragEvent(UIComponent uiComponent) {
+ super(uiComponent);
+ }
+
+ /* (non-Javadoc)
+ * @see
javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+ public boolean isAppropriateListener(FacesListener faceslistener) {
+ return faceslistener instanceof DragListener;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+ public void processListener(FacesListener faceslistener) {
+ ((DragListener) faceslistener).processDrag(this);
+ }
+
+ public Object getDragValue() {
+ return ((Draggable) this.getSource()).getDragValue();
+ }
+
+ public Dropzone getDropTarget() {
+ return dropTarget;
+ }
+
+ /**
+ * @see java.util.EventObject#toString()
+ */
+/* public String toString() {
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
+ append("component", getComponent()).append("source",
getSource()).append("phaseId", getPhaseId()).
+ append("dragValue", getDragValue()).
+ append("dropTarget", getDropTarget()).
+ append("dropValue", getDropValue()).
+ toString();
+ }
+*/
+ public void setDropTarget(Dropzone dropTarget) {
+ this.dropTarget = dropTarget;
+ }
+
+ public Object getAcceptedTypes() {
+ return acceptedTypes;
+ }
+
+ public void setAcceptedTypes(Object acceptedTypes) {
+ this.acceptedTypes = acceptedTypes;
+ }
+
+ public Object getDropValue() {
+ return dropValue;
+ }
+
+ public void setDropValue(Object dropValue) {
+ this.dropValue = dropValue;
+ }
+}
Added: sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DragListener.java
===================================================================
--- sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DragListener.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DragListener.java 2010-11-18
14:37:57 UTC (rev 20086)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 27.12.2006
+ *
+ */
+public interface DragListener extends FacesListener {
+ public void processDrag(DragEvent event);
+
+}
Added: 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
(rev 0)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropEvent.java 2010-11-18
14:37:57 UTC (rev 20086)
@@ -0,0 +1,107 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesListener;
+
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
+
+/**
+ * @author shura
+ *
+ */
+public class DropEvent extends DnDEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1660545054556302746L;
+
+ private Draggable draggableSource;
+ private String dragType;
+ private Object dragValue;
+
+ public DropEvent(UIComponent component) {
+ super(component);
+ }
+
+ /* (non-Javadoc)
+ * @see
javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+ public boolean isAppropriateListener(FacesListener listener) {
+ return listener instanceof DropListener;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+ public void processListener(FacesListener listener) {
+ ((DropListener) listener).processDrop(this);
+ }
+
+ /**
+ * @return the dropValue
+ */
+ public Object getDropValue() {
+ return ((Dropzone) this.getSource()).getDropValue();
+ }
+
+ public Draggable getDraggableSource() {
+ return draggableSource;
+ }
+
+ /**
+ * @see java.util.EventObject#toString()
+ */
+/* public String toString() {
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
+ append("component", getComponent()).
+ append("source", getSource()).
+ append("phaseId", getPhaseId()).
+ append("dropValue", getDropValue()).
+ append("draggableSource", getDraggableSource()).
+ append("dragValue", getDragValue()).
+ toString();
+ }
+*/
+ public void setDraggableSource(Draggable draggableSource) {
+ this.draggableSource = draggableSource;
+ }
+
+ public String getDragType() {
+ return dragType;
+ }
+
+ public void setDragType(String dragType) {
+ this.dragType = dragType;
+ }
+
+ public Object getDragValue() {
+ return dragValue;
+ }
+
+ public void setDragValue(Object dragValue) {
+ this.dragValue = dragValue;
+ }
+}
Added: sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropListener.java
===================================================================
--- sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropListener.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropListener.java 2010-11-18
14:37:57 UTC (rev 20086)
@@ -0,0 +1,39 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * Listener for process Drop events
+ * @author shura
+ *
+ */
+public interface DropListener extends FacesListener {
+
+ /**
+ * Process event on Drop for this component.
+ * @param event
+ */
+ public void processDrop(DropEvent event);
+
+}
Added: sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropSource.java
===================================================================
--- sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropSource.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/api/src/main/java/org/richfaces/event/DropSource.java 2010-11-18
14:37:57 UTC (rev 20086)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.event;
+
+import javax.faces.el.MethodBinding;
+
+/**
+ * Interface for component applicable to process drag/drop events.
+ * @author shura
+ *
+ */
+public interface DropSource {
+
+ /**
+ * Append drop listener to component listeners collection
+ * @param listener
+ */
+ public void addDropListener(DropListener listener);
+
+ /**
+ * Get array of all Drop Listeners
+ * @return
+ */
+ public DropListener[] getDropListeners();
+
+ /**
+ * Remove drop listener from component listeners array.
+ * @param listener
+ */
+ public void removeDropListener(DropListener listener);
+
+ public void setDropListener(MethodBinding binding);
+ public MethodBinding getDropListener();
+
+}