|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.common.ui.services.dnd.drop.AbstractDropTargetListener
public abstract class AbstractDropTargetListener
Abstract parent of all the drop target listeners
Nested Class Summary | |
---|---|
static class |
AbstractDropTargetListener.WorkIndicatorType
Enumerated type for work indicator type |
Constructor Summary | |
---|---|
AbstractDropTargetListener()
Default Constructor for AbstractDropTargetListener. |
|
AbstractDropTargetListener(java.lang.String[] transferIdArray)
Constructor for AbstractDropTargetListener. |
Method Summary | |
---|---|
void |
addSupportingTransferId(java.lang.String transferId)
Add transfer id to the list of transferIds. |
abstract boolean |
canSupport()
Returns whether the listener can support handling drop operations on the current target context and the current event. |
boolean |
canSupport(IDropTargetContext cntxt,
IDropTargetEvent currEvent,
ITransferAgent currAgent)
Returns a boolean indicating whether the listener can support drop operations on the current target. |
void |
dragEnter(DropTargetEvent event)
|
void |
dragLeave(DropTargetEvent event)
|
void |
dragOperationChanged(DropTargetEvent event)
|
void |
dragOver(DropTargetEvent event)
|
void |
drop(DropTargetEvent event)
|
void |
dropAccept(DropTargetEvent event)
|
protected IDropTargetContext |
getContext()
Returns the context. |
protected ITransferAgent |
getCurrentAgent()
Returns the current transfer agent. |
protected IDropTargetEvent |
getCurrentEvent()
Returns the current event. |
ICommand |
getExecutableContext(DropTargetEvent event)
Returns a command for dropping the event data on the drop target. |
protected Shell |
getShell()
Returns the current shell. |
java.lang.String[] |
getSupportingTransferIds()
Returns the supporting transfer agent ids. |
protected AbstractDropTargetListener.WorkIndicatorType |
getWorkIndicatorType()
Gets type of work indicator (progress monitor, hourglass, or none). |
void |
setFeedback(DropTargetEvent event)
Provides the listener an opportunity to set the feedback when hovering over a target. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDropTargetListener(java.lang.String[] transferIdArray)
transferIdArray
- The transfer agent idspublic AbstractDropTargetListener()
Method Detail |
---|
public final java.lang.String[] getSupportingTransferIds()
IDropTargetListener
getSupportingTransferIds
in interface IDropTargetListener
public final void addSupportingTransferId(java.lang.String transferId)
transferId
- String id to addpublic void dragEnter(DropTargetEvent event)
dragEnter
in interface DropTargetListener
public void dragLeave(DropTargetEvent event)
dragLeave
in interface DropTargetListener
public void dragOperationChanged(DropTargetEvent event)
dragOperationChanged
in interface DropTargetListener
public void dragOver(DropTargetEvent event)
dragOver
in interface DropTargetListener
public final void drop(DropTargetEvent event)
drop
in interface DropTargetListener
public void dropAccept(DropTargetEvent event)
dropAccept
in interface DropTargetListener
protected final IDropTargetContext getContext()
public ICommand getExecutableContext(DropTargetEvent event)
IDropTargetListener
getExecutableContext
in interface IDropTargetListener
event
- the event associated with the drop event
public void setFeedback(DropTargetEvent event)
IDropTargetListener
setFeedback
in interface IDropTargetListener
event
- The drop target eventpublic abstract boolean canSupport()
public final boolean canSupport(IDropTargetContext cntxt, IDropTargetEvent currEvent, ITransferAgent currAgent)
IDropTargetListener
canSupport
in interface IDropTargetListener
cntxt
- The drop action contextcurrEvent
- The current drop eventcurrAgent
- the current transfer agent
protected final IDropTargetEvent getCurrentEvent()
protected final ITransferAgent getCurrentAgent()
protected final Shell getShell()
protected AbstractDropTargetListener.WorkIndicatorType getWorkIndicatorType()
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.