com.webrenderer.event
Class DragEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.webrenderer.event.DragEvent
All Implemented Interfaces:
java.io.Serializable

public class DragEvent
extends java.util.EventObject

An event which indicates that there has been a drag event. DragEvent will be invoked if a selection is dragged anywhere on the document.

This event should not be confused with java.awt.event.DragEvent. You should explicitly use com.webrenderer.event.DragEvent


This DragEvent inherits from the java.util.EventObject.

When using this object you can find the url of the object being dropped by using the getDropUrl method.
e.g.


 public void onDragDrop( com.webrenderer.event.DragEvent e ) {
 		String url = e.getDropUrl();
 		System.out.println( "URL being dropped: " + url );
 }
 

To reduce the cost of multiple method invocations, the event object will record the new data pertaining to the event. Currently only available on Windows.

See Also:
Serialized Form

Constructor Summary
DragEvent(java.awt.Component source, int eid)
          Creates a com.webrenderer.event.DragEvent with the specified parameters.
 
Method Summary
 java.lang.String getDropUrl()
          Returns the URL for the file being dropped on the document
 IElement getTargetElement()
          Returns the DOM element that this drag event was fired on.
 void setDropUrl(java.lang.String url)
           
 void setTargetElement(IElement targetElement)
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DragEvent

public DragEvent(java.awt.Component source,
                 int eid)
Creates a com.webrenderer.event.DragEvent with the specified parameters. This DragEvent inherits from the java.util.EventObject. This DragEvent inherits from the java.util.EventObject.

When using this object you can find the url of the object being dropped by using the getDropUrl method.
e.g.


 public void onDragDrop( com.webrenderer.event.DragEvent e ) {
 		String url = e.getDropUrl();
 		System.out.println( "URL being dropped: " + url );
 }

Method Detail

getTargetElement

public IElement getTargetElement()
Returns the DOM element that this drag event was fired on.

Returns:

setTargetElement

public void setTargetElement(IElement targetElement)

getDropUrl

public java.lang.String getDropUrl()
Returns the URL for the file being dropped on the document

Returns:

setDropUrl

public void setDropUrl(java.lang.String url)