OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.dnd.touch
Class AdfColumnDropTarget

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.dnd.AdfDropTarget
               |
               +--oracle.adfinternal.view.js.dnd.touch.AdfColumnDropTarget

public class AdfColumnDropTarget
extends AdfDropTarget
Column drop target to support drag and drop reordering of columns on touch devices.


See also:
AdfColumnDragSource

Field Summary

private static Object
_COL_DROP_TAGET_CLASS
private static Object
_FLAVOR
Flavor for a rich column drag source


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfColumnDropTarget()
Column drop target to support drag and drop reordering of columns on touch devices.


Method Summary

public Object
acceptDragEnter(Object dndContext, Object proposedAction, Object pageX, Object pageY)
Checks if the proposed drop is for a column owned by the table the dragging column is owned by and that the resulting drop operation would result in a reorder.
public Object
acceptDragOver(Object dndContext, Object proposedAction, Object pageX, Object pageY)
Check if the base class allows the drag and that the column being dragged is the same table as the component for this drop target.
private Object
_applyUserFeedback(AdfDndContext dndContext, Integer pageX, Integer pageY)
Apply style classes to the column to insert before and insert after to provide improved user feedback over the default drag and drop feedback.
private Object
_createColumnDropTarget(AdfRichColumn column)
Creates a DIV to display to the user where to drop the column.
private Object
_createColumnReorderTracker(AdfRichColumn column)
Creates a DIV
public Object
dragExit(Object dndContext)
Removes any user feedback for dragging between two columns.
public Object
drop(Object dndContext, Object proposedAction, Object pageX, Object pageY)
Handles queuing a column reorder event on the server.
protected Object
GetAllowedActions(Object dndContext)
Permits move actions for column reordering.
protected Object
GetAllowedFlavors(Object dndContext)
Return a singleton array of a component drag and drop flavor for a rich column.
private ?AdfRichColumn
_getDragColumn(AdfDndContext dndContext)
Get the column being dragged from the drag and drop context.
private ?AdfRichTable
_getTable(AdfRichColumn column)
Get the table component for the given column
protected Object
Init()
Initializes this class
private Boolean
_isDragAllowed(AdfDnDContext dndContext)
Perform any other drag logic to see if the drop should be allowed.
private Object
_positionColumnDropTarget(AdfDnDContext dndContext, Integer pageX, Integer pageY)
Positions the DIV between the columns on the correct column gap
private Object
_removeUserFeedback(AdfDndContext dndContext)
Removes the custom user feedback if necessary.


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

AcceptDrag, acceptDropActionChanged, AcceptedDragEnter, CalculateFlavorAcceptance, getComponent, toDebugString


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

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


Field Detail


_COL_DROP_TAGET_CLASS

private static Object _COL_DROP_TAGET_CLASS

_FLAVOR

private static Object _FLAVOR

Flavor for a rich column drag source

Constructor Detail


AdfColumnDropTarget

public AdfColumnDropTarget()

Column drop target to support drag and drop reordering of columns on touch devices.

Method Detail


acceptDragEnter

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

Checks if the proposed drop is for a column owned by the table the dragging column is owned by and that the resulting drop operation would result in a reorder. This method also applies an additional style to indicate to the user where the column will be dropped.

Parameters:
dndContext    
proposedAction    
pageX    
pageY    
Return:
Object
Overrides:
AdfDropTarget.acceptDragEnter(Object, Object, Object, Object)

acceptDragOver

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

Check if the base class allows the drag and that the column being dragged is the same table as the component for this drop target. If so, this positions the UI feedback to the user where the drop will take place.

Parameters:
dndContext    
proposedAction    
pageX    
pageY    
Return:
Object
Overrides:
AdfDropTarget.acceptDragOver(Object, Object, Object, Object)

_applyUserFeedback

private Object _applyUserFeedback(AdfDndContext dndContext,
                                  Integer pageX,
                                  Integer pageY)

Apply style classes to the column to insert before and insert after to provide improved user feedback over the default drag and drop feedback.

Parameters:
dndContext  -  the drag and drop context
pageX  -  the page X co-ordinate of the event
pageY  -  the page Y co-ordinate of the event
Return:
Object

_createColumnDropTarget

private Object _createColumnDropTarget(AdfRichColumn column)

Creates a DIV to display to the user where to drop the column.

Parameters:
column  -  under the drag
Return:
Object

_createColumnReorderTracker

private Object _createColumnReorderTracker(AdfRichColumn column)

Creates a DIV

Parameters:
column  -  under the drag
Return:
Object

dragExit

public Object dragExit(Object dndContext)

Removes any user feedback for dragging between two columns.

Parameters:
dndContext    
Return:
Object
Overrides:
AdfDropTarget.dragExit(Object)

drop

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

Handles queuing a column reorder event on the server.

Parameters:
dndContext    
proposedAction    
pageX    
pageY    
Return:
Object
Overrides:
AdfDropTarget.drop(AdfDnDContext, Object, Number, Number)

GetAllowedActions

protected Object GetAllowedActions(Object dndContext)

Permits move actions for column reordering.

Parameters:
dndContext    
Return:
Object
Overrides:
AdfDropTarget.GetAllowedActions(Object)

GetAllowedFlavors

protected Object GetAllowedFlavors(Object dndContext)

Return a singleton array of a component drag and drop flavor for a rich column.

Parameters:
dndContext    
Return:
Object
Overrides:
AdfDropTarget.GetAllowedFlavors(Object)

_getDragColumn

private ?AdfRichColumn _getDragColumn(AdfDndContext dndContext)

Get the column being dragged from the drag and drop context.

Parameters:
dndContext  -  the drag and drop context
Return:
?AdfRichColumn - the column, or null if a column is not being dragged.

_getTable

private ?AdfRichTable _getTable(AdfRichColumn column)

Get the table component for the given column

Parameters:
column  -  the column
Return:
?AdfRichTable - the table, if found

Init

protected Object Init()

Initializes this class

Return:
Object
Overrides:
AdfObject.Init()

_isDragAllowed

private Boolean _isDragAllowed(AdfDnDContext dndContext)

Perform any other drag logic to see if the drop should be allowed. This checks that the table of the dragged column is the same as the table for the column of this drop target.

Parameters:
dndContext  -  the drag and drop context
Return:
Boolean - true if the drag should be allowed

_positionColumnDropTarget

private Object _positionColumnDropTarget(AdfDnDContext dndContext,
                                         Integer pageX,
                                         Integer pageY)

Positions the DIV between the columns on the correct column gap

Parameters:
dndContext  -  the drag and drop context
pageX  -  the x co-ordinate of the drag on the page
pageY  -  the y co-ordinate of the drag on the page
Return:
Object

_removeUserFeedback

private Object _removeUserFeedback(AdfDndContext dndContext)

Removes the custom user feedback if necessary.

Parameters:
dndContext  -  the drag and drop context.
Return:
Object

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.