public class DnDEventImpl extends UserDataHolderBase implements java.awt.datatransfer.Transferable, DnDEvent
DnDEvent.DropTargetHighlightingType
Modifier and Type | Field and Description |
---|---|
static java.awt.datatransfer.DataFlavor |
ourDataFlavor |
Constructor and Description |
---|
DnDEventImpl(DnDManagerImpl manager,
DnDAction action,
java.lang.Object attachedObject,
java.awt.Point point) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandleDrop() |
void |
cleanUp() |
void |
clearDelegatedTarget() |
protected java.lang.Object |
clone() |
void |
delegateDropTo(DnDTarget target) |
boolean |
delegateUpdateTo(DnDTarget target) |
boolean |
equals(java.lang.Object o) |
DnDAction |
getAction() |
java.lang.Object |
getAttachedObject() |
java.awt.Component |
getCurrentOverComponent() |
java.awt.Cursor |
getCursor() |
DnDTarget |
getDelegatedTarget() |
java.lang.String |
getExpectedDropResult() |
java.awt.Component |
getHandlerComponent() |
java.awt.Point |
getLocalPoint()
Returns point relative to dnd target's origin
|
java.awt.Point |
getOrgPoint() |
java.awt.Point |
getPoint() |
java.awt.Point |
getPointOn(java.awt.Component aComponent) |
RelativePoint |
getRelativePoint() |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor) |
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors() |
protected void |
handleDrop() |
int |
hashCode() |
void |
hideHighlighter() |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor) |
boolean |
isDropPossible() |
void |
setAutoHideHighlighterInDrop(boolean aValue) |
void |
setCursor(java.awt.Cursor cursor) |
void |
setDropPossible(boolean possible) |
void |
setDropPossible(boolean possible,
java.lang.String aExpectedResult) |
void |
setDropPossible(java.lang.String aExpectedResult,
DropActionHandler aHandler) |
void |
setHighlighting(java.awt.Component aComponent,
int aType) |
void |
setHighlighting(javax.swing.JLayeredPane layeredPane,
RelativeRectangle rectangle,
int aType) |
void |
setHighlighting(RelativeRectangle rectangle,
int aType) |
void |
setLocalPoint(java.awt.Point localPoint) |
void |
setOrgPoint(java.awt.Point orgPoint) |
java.lang.String |
toString() |
void |
updateAction(DnDAction action) |
boolean |
wasDelegated() |
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
finalize, getClass, notify, notifyAll, wait, wait, wait
getUserData, putUserData
public DnDEventImpl(DnDManagerImpl manager, DnDAction action, java.lang.Object attachedObject, java.awt.Point point)
public void updateAction(DnDAction action)
updateAction
in interface DnDEvent
public java.lang.Object getAttachedObject()
getAttachedObject
in interface DnDEvent
public void setDropPossible(boolean possible, java.lang.String aExpectedResult)
setDropPossible
in interface DnDEvent
public void setDropPossible(boolean possible)
setDropPossible
in interface DnDEvent
public void setDropPossible(java.lang.String aExpectedResult, DropActionHandler aHandler)
setDropPossible
in interface DnDEvent
public java.lang.String getExpectedDropResult()
getExpectedDropResult
in interface DnDEvent
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface DnDEvent
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface DnDEvent
getTransferData
in interface java.awt.datatransfer.Transferable
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported
in interface DnDEvent
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
public boolean isDropPossible()
isDropPossible
in interface DnDEvent
public java.awt.Point getOrgPoint()
getOrgPoint
in interface DnDEvent
public void setOrgPoint(java.awt.Point orgPoint)
setOrgPoint
in interface DnDEvent
public java.awt.Point getPointOn(java.awt.Component aComponent)
getPointOn
in interface DnDEvent
public boolean canHandleDrop()
canHandleDrop
in interface DnDEvent
protected void handleDrop()
public java.awt.Component getHandlerComponent()
getHandlerComponent
in interface DnDEvent
public java.awt.Component getCurrentOverComponent()
getCurrentOverComponent
in interface DnDEvent
public void setHighlighting(java.awt.Component aComponent, int aType)
setHighlighting
in interface DnDEvent
public void setHighlighting(RelativeRectangle rectangle, int aType)
setHighlighting
in interface DnDEvent
public void setHighlighting(javax.swing.JLayeredPane layeredPane, RelativeRectangle rectangle, int aType)
setHighlighting
in interface DnDEvent
public void setAutoHideHighlighterInDrop(boolean aValue)
setAutoHideHighlighterInDrop
in interface DnDEvent
public void hideHighlighter()
hideHighlighter
in interface DnDEvent
public void setLocalPoint(java.awt.Point localPoint)
setLocalPoint
in interface DnDEvent
public java.awt.Point getLocalPoint()
getLocalPoint
in interface DnDEvent
public RelativePoint getRelativePoint()
getRelativePoint
in interface DnDEvent
public void clearDelegatedTarget()
clearDelegatedTarget
in interface DnDEvent
public boolean wasDelegated()
wasDelegated
in interface DnDEvent
public DnDTarget getDelegatedTarget()
getDelegatedTarget
in interface DnDEvent
public boolean delegateUpdateTo(DnDTarget target)
delegateUpdateTo
in interface DnDEvent
public void delegateDropTo(DnDTarget target)
delegateDropTo
in interface DnDEvent
protected java.lang.Object clone()
clone
in class UserDataHolderBase
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void setCursor(java.awt.Cursor cursor)