OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adf.view.js.dnd
Class AdfDropTarget

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.dnd.AdfDropTarget
Direct Known Subclasses:
AdfAttributeDropTarget, AdfBasicDropTarget, AdfCalendarDropTarget, AdfColumnDropTarget, AdfStampedDropTarget

public class AdfDropTarget
extends AdfObject
Superclass of Objects that accept Drops from Drag and Drop


Field Summary

private Object
_component

Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass

Fields inherited from org.ecmascript.object.Object

prototype

Constructor Summary

public
AdfDropTarget()
Superclass of Objects that accept Drops from Drag and Drop

Method Summary

protected Number
AcceptDrag(Object dndContext, Object possibleActions, Object proposedAction, Object pageX, Object pageY)
Returns the action to use for this combination of possible and proposed actions.
private Number
_acceptDrag(Object dndContext, Object proposedAction, Object pageX, Object pageY)
public Number
acceptDragEnter(Object dndContext, Object proposedAction, Object pageX, Object pageY)
Called while a drag operation is ongoing, when the mouse pointer enters the operable part of the drop site for the AdfDropTarget.
public Number
acceptDragOver(Object dndContext, Object proposedAction, Object pageX, Object pageY)
Called when a drag operation is ongoing, while the mouse pointer is still over the operable part of the drop site for the AdfDropTarget registered with this listener.
public Number
acceptDropActionChanged(Object dndContext, Object proposedAction, Object pageX, Object pageY)
Called if the user has modified the current drop gesture
protected Object
AcceptedDragEnter(Object dndContext, Object userAction, Object pageX, Object pageY)
protected Boolean
CalculateFlavorAcceptance(Object dndContext)
Returns true if the drag supports one of the flavors we want
public Object
dragExit(Object dndContext)
Called while a drag operation is ongoing, when the mouse pointer has exited the operable part of the drop site for the AdfDropTarget.
public Number
drop(AdfDnDContext dndContext, Object proposedAction, Number pageX, Number pageY)
Called when the drag operation has terminated with a drop on the operable part of the drop site for the AdfDropTarget
protected Number
GetAllowedActions(Object dndContext)
Subclasses can override to control the set of actions they allow
protected Array<AdfDataFlavor>
GetAllowedFlavors(Object dndContext)
Returns the Array of allowed AdfDataFlavors.
public AdfUIComponent
getComponent()
Returns the Component that this AdfDropTarget is attached to
protected Object
Init()
Initializes the instance.
Object
__setComponent(Object component)
Set by the AdfUIComponent when the drag source is attacjed
public Object
toDebugString()

Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toString

Field Detail


_component

private Object _component

Constructor Detail


AdfDropTarget

public AdfDropTarget()

Superclass of Objects that accept Drops from Drag and Drop

Method Detail


AcceptDrag

protected Number AcceptDrag(Object dndContext,
                            Object possibleActions,
                            Object proposedAction,
                            Object pageX,
                            Object pageY)

Returns the action to use for this combination of possible and proposed actions. The default implementation calls GetAllowedFlavors to retrieve the list of AdfDataFlavors this AdfDropTarget supports. Subclasses that want more involved acceptance criteria should override this method.

Parameters:
dndContext  
possibleActions  
proposedAction  
pageX  
pageY  
Return:
Number - the current support AdfDnDContext.ACTION, or DndContext.ACTION_NONE if a drop isn't supported.

_acceptDrag

private Number _acceptDrag(Object dndContext,
                           Object proposedAction,
                           Object pageX,
                           Object pageY)

Parameters:
dndContext  
proposedAction  
pageX  
pageY  
Return:
Number - the current support AdfDnDContext.ACTION, or DndContext.ACTION_NONE if a drop isn't supported.

acceptDragEnter

public Number acceptDragEnter(Object dndContext,
                              Object proposedAction,
                              Object pageX,
                              Object pageY)

Called while a drag operation is ongoing, when the mouse pointer enters the operable part of the drop site for the AdfDropTarget.

Parameters:
dndContext  
proposedAction  
pageX  
pageY  
Return:
Number - the current support AdfDnDContext.ACTION, or DndContext.ACTION_NONE if a drop isn't supported.

acceptDragOver

public Number acceptDragOver(Object dndContext,
                             Object proposedAction,
                             Object pageX,
                             Object pageY)

Called when a drag operation is ongoing, while the mouse pointer is still over the operable part of the drop site for the AdfDropTarget registered with this listener.

Parameters:
dndContext  
proposedAction  
pageX  
pageY  
Return:
Number - the current support AdfDnDContext.ACTION, or DndContext.ACTION_NONE if a drop isn't supported.

acceptDropActionChanged

public Number acceptDropActionChanged(Object dndContext,
                                      Object proposedAction,
                                      Object pageX,
                                      Object pageY)

Called if the user has modified the current drop gesture

Parameters:
dndContext  
proposedAction  
pageX  
pageY  
Return:
Number - the current support AdfDnDContext.ACTION, or DndContext.ACTION_NONE if a drop isn't supported.

AcceptedDragEnter

protected Object AcceptedDragEnter(Object dndContext,
                                   Object userAction,
                                   Object pageX,
                                   Object pageY)

Parameters:
dndContext  
userAction  
pageX  
pageY  
Return:
Object

CalculateFlavorAcceptance

protected Boolean CalculateFlavorAcceptance(Object dndContext)

Returns true if the drag supports one of the flavors we want

Parameters:
dndContext  
Return:
Boolean - null true if the transferable contains an AdfDataFlavor that this AdfDropTarget can consume

dragExit

public Object dragExit(Object dndContext)

Called while a drag operation is ongoing, when the mouse pointer has exited the operable part of the drop site for the AdfDropTarget.

Parameters:
dndContext  
Return:
Object

drop

public Number drop(AdfDnDContext dndContext,
                   Object proposedAction,
                   Number pageX,
                   Number pageY)

Called when the drag operation has terminated with a drop on the operable part of the drop site for the AdfDropTarget

Parameters:
dndContext - Drag and drop context
proposedAction  
pageX  
pageY  
Return:
Number - the chosen AdfDnDContext.ACTION, or DndContext.ACTION_NONE if no drop actually occurred. Sunclasses should override this method to actually perform the drop

GetAllowedActions

protected Number GetAllowedActions(Object dndContext)

Subclasses can override to control the set of actions they allow

Parameters:
dndContext  
Return:
Number - Bitmask of allowed actions

GetAllowedFlavors

protected Array<AdfDataFlavor> GetAllowedFlavors(Object dndContext)

Returns the Array of allowed AdfDataFlavors. If subclasses plan to use the default implementation of AcceptDrag, they must override this method to return thier support AdfDataFlavors.

Parameters:
dndContext  
Return:
Array<AdfDataFlavor> - null

getComponent

public AdfUIComponent getComponent()

Returns the Component that this AdfDropTarget is attached to

Return:
AdfUIComponent - null

Init

protected Object Init()

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Return:
Object
Overrides:
AdfObject.Init()

__setComponent

Object __setComponent(Object component)

Set by the AdfUIComponent when the drag source is attacjed

Parameters:
component  
Return:
Object

toDebugString

public Object toDebugString()

Return:
Object
Overrides:
AdfObject.toDebugString()

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.