OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adf.view.js.dnd
Class AdfDragSource

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.dnd.AdfDragSource
Direct Known Subclasses:
AdfAttributeDragSource, AdfCalendarDragSource, AdfComponentDragSource, AdfStampedDragSource

public class AdfDragSource
extends AdfObject



Field Summary

private Object
_allowedActions
private Object
_component
private Object
_defaultAction
private Object
_dragRecognizer


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDragSource(Object allowedActions, Object defaultAction)


Method Summary

public Object
applyDragReadyState(AdfUIInputEvent inputEvent)
Called by the framework when the drag is ready to be initiated.
public Object
applyDragSourceState(AdfDomUIInputEvent inputEvent)
Called by the framework when a drag has been initiated on the drag source.
public Object
clearDragReadyState(Object dragReadyObj)
Called by the framework when the drag to clear the drag ready state.
public Object
clearDragSourceState(Object dragSourceObj)
Called by the framework when the drag to clear the drag source state.
protected AdfDragRecognizer
CreateDragRecognizer()
Creates the AdfDragRecognizer to use with this AdfDragSource.
public Object
dragDropEnd(Object dndContext, Object dropAction)
This method is invoked to signify that the Drag and Drop operation is complete.
public Object
dragEnter(Object dndContext)
Called as the cursor's hotspot enters a platform-dependent drop site.
public Object
dragExit(Object dndContext)
Called as the cursor's hotspot exits a platform-dependent drop site.
public Object
dragOver(Object dndContext)
Called as the cursor's hotspot moves over a platform-dependent drop site.
public Object
dropActionChanged(Object dndContext)
Called when the user has modified the drop gesture.
public Object
getAllowedActions()
public AdfUIComponent
getComponent()
Returns the Component that this AdfDragSource is attached to
public Object
getDefaultAction()
protected Object
GetDefaultDragCursor()
protected Object
GetDragOffset(Object inputEvent)
Returns the offset from the origin of the dragged object for the Drag trigger event, or null if no dragging should be allowed
protected Object
GetDragOverFeedback(AdfUIInputEvent inputEvent)
Returns the DOM Node to use for the drag over feedback.
public Object
getDragRecognizer()
Returns the AdfDragRecognizer to use for this AdfDragSource
protected AdfTransferable
GetDragTransferable(AdfUIInputEvent inputEvent)
Subclasses should override to provide the AdfTransferable.
protected Object
Init(Object allowedActions, Object defaultAction)
Initializes the instance.
public Object
initiateDrag(Object dndContext, Object triggerEvent)
Called on the AdfDragSource to actually start the Drag.
public Object
isAvailable(Object inputEvent)
Returns true if a AdfDragSource is available at this location
Object
__setComponent(Object component)
Set by the AdfUIComponent when the drag source is attached
public Object
toDebugString()


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

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


Field Detail


_allowedActions

private Object _allowedActions

_component

private Object _component

_defaultAction

private Object _defaultAction

_dragRecognizer

private Object _dragRecognizer

Constructor Detail


AdfDragSource

public AdfDragSource(Object allowedActions,
                     Object defaultAction)

Parameters:
allowedActions    
defaultAction    

Method Detail


applyDragReadyState

public Object applyDragReadyState(AdfUIInputEvent inputEvent)

Called by the framework when the drag is ready to be initiated. This method should display a change in the UI to indicate to the user that it is now possible to initiate a drag operation on the target of the event. This method is used in instances where a gesture must be executed before an item may be dragged.

Parameters:
inputEvent  -  the event that triggered the drag
Return:
Object - An object that will be passed back to the drag source in order to clear the drag ready state
See also:
clearDragReadyState(Object)

applyDragSourceState

public Object applyDragSourceState(AdfDomUIInputEvent inputEvent)

Called by the framework when a drag has been initiated on the drag source. This method should display a change in the UI to indicate to the user what node is being dragged.

Parameters:
inputEvent  -  the event that triggered the drag
Return:
Object - An object that will be passed back to the clear method
See also:
clearDragSourceState(Object)

clearDragReadyState

public Object clearDragReadyState(Object dragReadyObj)

Called by the framework when the drag to clear the drag ready state.

Parameters:
dragReadyObj  -  the object returned from the apply method
Return:
Object
See also:
applyDragReadyState(AdfUIInputEvent)

clearDragSourceState

public Object clearDragSourceState(Object dragSourceObj)

Called by the framework when the drag to clear the drag source state.

Parameters:
dragSourceObj  -  the object returned from the apply method
Return:
Object
See also:
applyDragSourceState(AdfDomUIInputEvent)

CreateDragRecognizer

protected AdfDragRecognizer CreateDragRecognizer()

Creates the AdfDragRecognizer to use with this AdfDragSource. If null is returned, the AdfDragSource will use the peer's default AdfDragRecognizer.

Return:
AdfDragRecognizer - null .

dragDropEnd

public Object dragDropEnd(Object dndContext,
                          Object dropAction)

This method is invoked to signify that the Drag and Drop operation is complete.

Parameters:
dndContext    
dropAction  -  The drop Action chosen by the drop Target, AdfDnDContext.ACTION_NONE if the drop was cancelled.
Return:
Object

dragEnter

public Object dragEnter(Object dndContext)

Called as the cursor's hotspot enters a platform-dependent drop site. This method is invoked when all the following conditions are true:
  • The cursor's hotspot enters the operable part of a platform- dependent drop site.
  • The drop site is active.
  • The drop site accepts the drag.

Parameters:
dndContext    
Return:
Object

dragExit

public Object dragExit(Object dndContext)

Called as the cursor's hotspot exits a platform-dependent drop site. This method is invoked when any of the following conditions are true:
  • The cursor's hotspot no longer intersects the operable part of the drop site associated with the previous dragEnter() invocation.
OR
  • The drop site associated with the previous dragEnter() invocation is no longer active.
OR
  • The drop site associated with the previous dragEnter() invocation has rejected the drag.

Parameters:
dndContext    
Return:
Object

dragOver

public Object dragOver(Object dndContext)

Called as the cursor's hotspot moves over a platform-dependent drop site. This method is invoked when all the following conditions are true:
  • The cursor's hotspot has moved, but still intersects the operable part of the drop site associated with the previous dragEnter() invocation.
  • The drop site is still active.
  • The drop site accepts the drag.

Parameters:
dndContext    
Return:
Object

dropActionChanged

public Object dropActionChanged(Object dndContext)

Called when the user has modified the drop gesture. This method is invoked when the state of the input device(s) that the user is interacting with changes. Such devices are typically the mouse buttons or keyboard modifiers that the user is interacting with.

Parameters:
dndContext    
Return:
Object

getAllowedActions

public Object getAllowedActions()

Return:
Object

getComponent

public AdfUIComponent getComponent()

Returns the Component that this AdfDragSource is attached to

Return:
AdfUIComponent - component AdfDragSource is bound to

getDefaultAction

public Object getDefaultAction()

Return:
Object

GetDefaultDragCursor

protected Object GetDefaultDragCursor()

Return:
Object

GetDragOffset

protected Object GetDragOffset(Object inputEvent)

Returns the offset from the origin of the dragged object for the Drag trigger event, or null if no dragging should be allowed

Parameters:
inputEvent    
Return:
Object

GetDragOverFeedback

protected Object GetDragOverFeedback(AdfUIInputEvent inputEvent)

Returns the DOM Node to use for the drag over feedback. This Node should not be in the existing hierarchy.

The default implementation delegates to the peer


Parameters:
inputEvent  -  the inputEvent that triggered the drag
Return:
Object - Appropriate feedback object. For HTML, this is an HTML Node

getDragRecognizer

public Object getDragRecognizer()

Returns the AdfDragRecognizer to use for this AdfDragSource

Return:
Object

GetDragTransferable

protected AdfTransferable GetDragTransferable(AdfUIInputEvent inputEvent)

Subclasses should override to provide the AdfTransferable. The default implementation delegates to the peer

Parameters:
inputEvent  -  the inputEvent that triggered the drag
Return:
AdfTransferable - Default transferable object, or null if no default

Init

protected Object Init(Object allowedActions,
                      Object defaultAction)

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

Parameters:
allowedActions    
defaultAction    
Return:
Object
Overrides:
AdfObject.Init()

initiateDrag

public Object initiateDrag(Object dndContext,
                           Object triggerEvent)

Called on the AdfDragSource to actually start the Drag. The AdfDragSource should call startDrag on the AdfDnDContext in response.

Parameters:
dndContext    
triggerEvent    
Return:
Object

isAvailable

public Object isAvailable(Object inputEvent)

Returns true if a AdfDragSource is available at this location

Parameters:
inputEvent    
Return:
Object

__setComponent

Object __setComponent(Object component)

Set by the AdfUIComponent when the drag source is attached

Parameters:
component    
Return:
Object

toDebugString

public Object toDebugString()

Return:
Object
Overrides:
AdfObject.toDebugString()

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

 

Generated on 2012.08.25 02:16 UTC
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.