OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.dnd
Class AdfStampedDragSource

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.dnd.AdfDragSource
               |
               +--oracle.adfinternal.view.js.dnd.AdfStampedDragSource
Direct Known Subclasses:
AdfTableDragSource

public class AdfStampedDragSource
extends AdfDragSource
Abstract AdfDragSource, supporting drags from stamped components



Field Summary

private Object
_modelName


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfStampedDragSource(Number allowedActions, Object defaultAction, String modelName)
Abstract AdfDragSource, supporting drags from stamped components


Method Summary

public Object
applyDragReadyState(Object inputEvent)
Called by the framework when the drag is ready to be initiated.
protected Array
ApplyDragReadyStateForRowKeys(AdfUIInputEvent inputEvent, Array rowKeys)
Given an array of rowKeys, return the DOM elements that are ready for dragging.
public Object
applyDragSourceState(Object inputEvent)
Called by the framework when a drag has been initiated on the drag source.
protected Array
ApplyDragSourceStateForRowKeys(AdfUIInputEvent inputEvent, Array rowKeys)
Given an array of rowKeys, return the DOM elements that are being dragged.
protected Object
AreDraggedRowKeysAvailable(Object inputEvent)
Returns true if a drag started at the location of the inputEvent will result in a drag transferable containing the rowkey DataFlavor.
protected Object
GetDraggedRowKeys(Object mouseRowKey)
Given the rowKey under the mouse, return the set of rowKeys to drag.
protected Object
GetDragOffset(Object inputEvent)
Overriden to return the offset of the dragged object within the stamp, instead of the component, if the drag happens on a stamp.
protected Object
GetDragOffsetForRowKeys(AdfUIInputEvent inputEvent, Array rowKeys)
Given an array of rowKeys, and the inputEvent for drag returns the offset within the drag object.
protected Object
GetDragOverFeedback(Object inputEvent)
Override to return feedback for the dragged rowKeys.
protected Object
GetDragOverFeedbackForRowKeys(Object rowKeys)
Given an array of rowKeys, return the DOM Node to use for the drag-over feedback, if any.
protected Object
GetDragTransferable(Object inputEvent)
Return a transferable matching the modelName for this drag source.
public String
getModelName()
Returns model name used to identify this drag source.
public Object
getRowKeyDataFlavor()
private Object
_getRowKeys(Object inputEvent)
Returns the RowKeys to use for this inputEvent
protected Object
Init(Object allowedActions, Object defaultAction, Object modelName)
Initializes the instance.
public Object
isAvailable(Object dndContext, Object inputEvent)
Returns true if a AdfDragSource is available at this location


Methods inherited from oracle.adf.view.js.dnd.AdfDragSource

clearDragReadyState, clearDragSourceState, CreateDragRecognizer, dragDropEnd, dragEnter, dragExit, dragOver, dropActionChanged, getAllowedActions, getComponent, getDefaultAction, GetDefaultDragCursor, getDragRecognizer, initiateDrag, 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


_modelName

private Object _modelName

Constructor Detail


AdfStampedDragSource

public AdfStampedDragSource(Number allowedActions,
                            Object defaultAction,
                            String modelName)

Abstract AdfDragSource, supporting drags from stamped components

Parameters:
allowedActions  -  that can be performed by this drag source
defaultAction    
modelName  -  used to identify this dropTarget

Method Detail


applyDragReadyState

public Object applyDragReadyState(Object 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    
Return:
Object
Overrides:
AdfDragSource.applyDragReadyState(AdfUIInputEvent)

ApplyDragReadyStateForRowKeys

protected Array ApplyDragReadyStateForRowKeys(AdfUIInputEvent inputEvent,
                                              Array rowKeys)

Given an array of rowKeys, return the DOM elements that are ready for dragging.

Parameters:
inputEvent  -  the event that started the dragging.
rowKeys  -  array of row keys
Return:
Array - An array of DOMElements to have the drag-ready style applied to them.

applyDragSourceState

public Object applyDragSourceState(Object 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    
Return:
Object
Overrides:
AdfDragSource.applyDragSourceState(AdfDomUIInputEvent)

ApplyDragSourceStateForRowKeys

protected Array ApplyDragSourceStateForRowKeys(AdfUIInputEvent inputEvent,
                                               Array rowKeys)

Given an array of rowKeys, return the DOM elements that are being dragged.

Parameters:
inputEvent  -  the event that started the dragging.
rowKeys  -  array of row keys
Return:
Array - An array of DOMElements to have the drag-source style applied to them.

AreDraggedRowKeysAvailable

protected Object AreDraggedRowKeysAvailable(Object inputEvent)

Returns true if a drag started at the location of the inputEvent will result in a drag transferable containing the rowkey DataFlavor. The default implementation returns true if this.GetDraggedRowKeys() returns a non-null value for this inputEvent. Subclasses can override this behavior to be more efficient.

Parameters:
inputEvent    
Return:
Object

GetDraggedRowKeys

protected Object GetDraggedRowKeys(Object mouseRowKey)

Given the rowKey under the mouse, return the set of rowKeys to drag. Subclasses typically override this method to check whether the mouseRowKey is in the selection. If it is, then the entire selection is dragged, otherwise the on the mouseRowKey is dragged.

Parameters:
mouseRowKey    
Return:
Object

GetDragOffset

protected Object GetDragOffset(Object inputEvent)

Overriden to return the offset of the dragged object within the stamp, instead of the component, if the drag happens on a stamp. Subclassers can override the offset of the dragged object AdfStampedDragSource.GetDragOffsetForRowKeys

Parameters:
inputEvent    
Return:
Object
Overrides:
AdfDragSource.GetDragOffset(Object)

GetDragOffsetForRowKeys

protected Object GetDragOffsetForRowKeys(AdfUIInputEvent inputEvent,
                                         Array rowKeys)

Given an array of rowKeys, and the inputEvent for drag returns the offset within the drag object. The default implementation defers to the Peer for this information.

Parameters:
inputEvent    
rowKeys  -  the array of rowKeys
Return:
Object - point with x and y coordinates

GetDragOverFeedback

protected Object GetDragOverFeedback(Object inputEvent)

Override to return feedback for the dragged rowKeys. Subclassers can override the actual dragged icon by overriding AdfStampedAdfDragSource.GetDragOverFeedbackForRowKeys

Parameters:
inputEvent    
Return:
Object
Overrides:
AdfDragSource.GetDragOverFeedback(AdfUIInputEvent)

GetDragOverFeedbackForRowKeys

protected Object GetDragOverFeedbackForRowKeys(Object rowKeys)

Given an array of rowKeys, return the DOM Node to use for the drag-over feedback, if any. The default implementation defers to the Peer for this information.

Parameters:
rowKeys    
Return:
Object

GetDragTransferable

protected Object GetDragTransferable(Object inputEvent)

Return a transferable matching the modelName for this drag source.

Parameters:
inputEvent    
Return:
Object
Overrides:
AdfDragSource.GetDragTransferable(AdfUIInputEvent)

getModelName

public String getModelName()

Returns model name used to identify this drag source.

Return:
String - model name used to identify this drag source

getRowKeyDataFlavor

public Object getRowKeyDataFlavor()

Return:
Object

_getRowKeys

private Object _getRowKeys(Object inputEvent)

Returns the RowKeys to use for this inputEvent

Parameters:
inputEvent    
Return:
Object

Init

protected Object Init(Object allowedActions,
                      Object defaultAction,
                      Object modelName)

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

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

isAvailable

public Object isAvailable(Object dndContext,
                          Object inputEvent)

Returns true if a AdfDragSource is available at this location

Parameters:
dndContext    
inputEvent    
Return:
Object
Overrides:
AdfDragSource.isAvailable(Object)

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

 

Generated on 2014.03.27 12:59 UTC
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.