|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.refractions.udig.ui.IDropAction
public abstract class IDropAction
Defines the behaviour when a drag and drop event occurs. The extension declaration combined with the accepts method determines whether the Action will be ran for a given drag/drop event.
If the enablesFor is a anything other than null or 1 then an array of objects (all the same type) will be the data returned by getData, otherwise the data be a single object (not an array).
Field Summary | |
---|---|
static java.lang.String |
XPID
|
Constructor Summary | |
---|---|
IDropAction()
|
Method Summary | |
---|---|
abstract boolean |
accept()
Called if the action seems to be a good candidate for handling the drop event. |
java.lang.Object |
getData()
Returns the dropped data. |
java.lang.Object |
getDestination()
Returns the object that the data was dropped on. |
IConfigurationElement |
getElement()
Returns the Configuration element that definates the action in the extension declaration. |
DropTargetEvent |
getEvent()
The drop event. |
java.lang.String |
getName()
Returns the name of the action. |
ViewerDropLocation |
getViewerLocation()
This does not always make sense for the drop event. |
void |
init(IConfigurationElement element2,
DropTargetEvent event2,
ViewerDropLocation location2,
java.lang.Object destination2,
java.lang.Object data2)
Called by framework to initialize the action. |
abstract void |
perform(IProgressMonitor monitor)
Performs the drop action. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XPID
Constructor Detail |
---|
public IDropAction()
Method Detail |
---|
public IConfigurationElement getElement()
public java.lang.String getName()
public abstract boolean accept()
getData();
,
getData()
,
getEvent()
public abstract void perform(IProgressMonitor monitor)
monitor
- a progress monitor for showing the progress of the current event.public java.lang.Object getData()
public java.lang.Object getDestination()
public void init(IConfigurationElement element2, DropTargetEvent event2, ViewerDropLocation location2, java.lang.Object destination2, java.lang.Object data2)
element2
- the extension configuration elementevent2
- the drop event.location
- wrt the destination.destination2
- the object that the data was dropped on.data2
- the data that was dropped.public DropTargetEvent getEvent()
public ViewerDropLocation getViewerLocation()
ViewerDropAdapter#LOCATION_ON
otherwise it will be one of the LOCATION_*
values.ViewerDropAdapter#getCurrentLocation()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |