|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Object
qx.core.Target
qx.util.manager.Object
qx.event.handler.DragAndDropHandler
public class DragAndDropHandler
This manager (singleton) manage all drag and drop handling of a qx.core.Init instance.
Constructor Summary | |
---|---|
DragAndDropHandler()
|
Method Summary | |
---|---|
void |
_applyDestinationWidget(java.lang.Object value,
java.lang.Object old)
|
void |
_endDrag(java.lang.Object currentDestinationWidget,
Event e)
This will be called to the end of each drag and drop session |
void |
_endDragCore()
|
java.lang.Object |
_evalNewAction(java.lang.Object vKeyShift,
java.lang.Object vKeyCtrl,
java.lang.Object vKeyAlt)
|
void |
_fireUserEvents(java.lang.Object fromWidget,
java.lang.Object toWidget,
Event e)
|
void |
_handleKeyDown(Event e)
|
void |
_handleKeyUp(Event e)
|
void |
_handleMouseDown(Event e)
This starts the core drag and drop session. |
void |
_handleMouseMove(Event e)
Handler for mouse move events |
void |
_handleMouseUp(Event e)
Handle mouse up event. |
void |
_renderCursor()
Select and setup the current used cursor |
void |
_renderFeedbackWidget()
Renders the user feedback widget at the correct location. |
void |
addAction(java.lang.Object vAction,
java.lang.Object vForce)
|
void |
addData(java.lang.Object vMimeType,
java.lang.Object vData)
Add data of mimetype. |
void |
cancelDrag(Event e)
Cancel current drag and drop session |
void |
clearActions()
|
void |
clearData()
|
java.lang.String |
getCurrentAction()
Returns the (computed) value of the property currentAction . |
java.lang.Object |
getData(java.lang.Object vMimeType)
|
java.lang.Integer |
getDefaultCursorDeltaX()
Returns the (computed) value of the property defaultCursorDeltaX . |
java.lang.Integer |
getDefaultCursorDeltaY()
Returns the (computed) value of the property defaultCursorDeltaY . |
Widget |
getDestinationWidget()
Returns the (computed) value of the property destinationWidget . |
java.lang.Object |
getDropDataTypes()
|
void |
getDropTarget(java.lang.Object e)
|
Widget |
getSourceWidget()
Returns the (computed) value of the property sourceWidget . |
void |
globalCancelDrag()
|
void |
handleKeyEvent(Event e)
This wraps the key events to custom handlers. |
java.lang.Object |
handleMouseEvent(Event e)
This wraps the mouse events to custom handlers. |
void |
initCurrentAction(java.lang.String arg)
Calls the apply method and dispatches the change event of the property currentAction
with the default value defined by the class developer. |
void |
initDefaultCursorDeltaX(java.lang.Integer arg)
Calls the apply method and dispatches the change event of the property defaultCursorDeltaX
with the default value defined by the class developer. |
void |
initDefaultCursorDeltaY(java.lang.Integer arg)
Calls the apply method and dispatches the change event of the property defaultCursorDeltaY
with the default value defined by the class developer. |
void |
initDestinationWidget(Widget arg)
Calls the apply method and dispatches the change event of the property destinationWidget
with the default value defined by the class developer. |
void |
initSourceWidget(Widget arg)
Calls the apply method and dispatches the change event of the property sourceWidget
with the default value defined by the class developer. |
void |
removeAction(java.lang.Object vAction)
|
void |
resetCurrentAction()
Resets the user value of the property currentAction . |
void |
resetDefaultCursorDeltaX()
Resets the user value of the property defaultCursorDeltaX . |
void |
resetDefaultCursorDeltaY()
Resets the user value of the property defaultCursorDeltaY . |
void |
resetDestinationWidget()
Resets the user value of the property destinationWidget . |
void |
resetSourceWidget()
Resets the user value of the property sourceWidget . |
void |
setAction(java.lang.Object vAction)
|
void |
setCurrentAction(java.lang.String arg)
Sets the user value of the property currentAction . |
void |
setCursorPosition(int deltaX,
int deltaY)
Sets the position of the cursor feedback (the icon showing whether dropping is allowed at the current position and which action a drop will do). |
void |
setDefaultCursorDeltaX(java.lang.Integer arg)
Sets the user value of the property defaultCursorDeltaX . |
void |
setDefaultCursorDeltaY(java.lang.Integer arg)
Sets the user value of the property defaultCursorDeltaY . |
void |
setDestinationWidget(Widget arg)
Sets the user value of the property destinationWidget . |
void |
setFeedbackWidget(Widget widget,
int deltaX,
int deltaY,
boolean autoDisposeWidget)
Sets the widget to show as feedback for the user. |
void |
setSourceWidget(Widget arg)
Sets the user value of the property sourceWidget . |
void |
startDrag()
This needed be called from any “dragstart” event to really start drag session. |
void |
supportsDrop(java.lang.Object vWidget)
|
Methods inherited from class qx.util.manager.Object |
---|
add, disableAll, enableAll, get, getAll, has, remove |
Methods inherited from class qx.core.Target |
---|
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener |
Methods inherited from class qx.core.Object |
---|
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DragAndDropHandler()
Method Detail |
---|
public void _applyDestinationWidget(java.lang.Object value, java.lang.Object old)
public void _endDrag(java.lang.Object currentDestinationWidget, Event e)
This will be called to the end of each drag and drop session
public void _endDragCore()
public java.lang.Object _evalNewAction(java.lang.Object vKeyShift, java.lang.Object vKeyCtrl, java.lang.Object vKeyAlt)
public void _fireUserEvents(java.lang.Object fromWidget, java.lang.Object toWidget, Event e)
public void _handleKeyDown(Event e)
public void _handleKeyUp(Event e)
public void _handleMouseDown(Event e)
This starts the core drag and drop session.
To really get drag and drop working you need to define a function which you attach to “dragstart”-event, which invokes at least this.startDrag()
public void _handleMouseMove(Event e)
Handler for mouse move events
public void _handleMouseUp(Event e)
Handle mouse up event. Normally this finalize the drag and drop event.
public void _renderCursor()
Select and setup the current used cursor
public void _renderFeedbackWidget()
Renders the user feedback widget at the correct location.
public void addAction(java.lang.Object vAction, java.lang.Object vForce)
public void addData(java.lang.Object vMimeType, java.lang.Object vData)
Add data of mimetype.
#param vMimeType[String]: A valid mimetype #param vData[Any]: Any value for the mimetype
public void cancelDrag(Event e)
Cancel current drag and drop session
public void clearActions()
public void clearData()
public java.lang.String getCurrentAction()
Returns the (computed) value of the property currentAction
.
For further details take a look at the property definition: currentAction
.
public java.lang.Object getData(java.lang.Object vMimeType)
public java.lang.Integer getDefaultCursorDeltaX()
Returns the (computed) value of the property defaultCursorDeltaX
.
For further details take a look at the property definition: defaultCursorDeltaX
.
public java.lang.Integer getDefaultCursorDeltaY()
Returns the (computed) value of the property defaultCursorDeltaY
.
For further details take a look at the property definition: defaultCursorDeltaY
.
public Widget getDestinationWidget()
Returns the (computed) value of the property destinationWidget
.
For further details take a look at the property definition: destinationWidget
.
public java.lang.Object getDropDataTypes()
public void getDropTarget(java.lang.Object e)
public Widget getSourceWidget()
Returns the (computed) value of the property sourceWidget
.
For further details take a look at the property definition: sourceWidget
.
public void globalCancelDrag()
public void handleKeyEvent(Event e)
This wraps the key events to custom handlers.
public java.lang.Object handleMouseEvent(Event e)
This wraps the mouse events to custom handlers.
public void initCurrentAction(java.lang.String arg)
Calls the apply method and dispatches the change event of the property currentAction
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: currentAction
.
public void initDefaultCursorDeltaX(java.lang.Integer arg)
Calls the apply method and dispatches the change event of the property defaultCursorDeltaX
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: defaultCursorDeltaX
.
public void initDefaultCursorDeltaY(java.lang.Integer arg)
Calls the apply method and dispatches the change event of the property defaultCursorDeltaY
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: defaultCursorDeltaY
.
public void initDestinationWidget(Widget arg)
Calls the apply method and dispatches the change event of the property destinationWidget
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: destinationWidget
.
public void initSourceWidget(Widget arg)
Calls the apply method and dispatches the change event of the property sourceWidget
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: sourceWidget
.
public void removeAction(java.lang.Object vAction)
public void resetCurrentAction()
Resets the user value of the property currentAction
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: currentAction
.
public void resetDefaultCursorDeltaX()
Resets the user value of the property defaultCursorDeltaX
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: defaultCursorDeltaX
.
public void resetDefaultCursorDeltaY()
Resets the user value of the property defaultCursorDeltaY
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: defaultCursorDeltaY
.
public void resetDestinationWidget()
Resets the user value of the property destinationWidget
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: destinationWidget
.
public void resetSourceWidget()
Resets the user value of the property sourceWidget
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: sourceWidget
.
public void setAction(java.lang.Object vAction)
public void setCurrentAction(java.lang.String arg)
Sets the user value of the property currentAction
.
For further details take a look at the property definition: currentAction
.
public void setCursorPosition(int deltaX, int deltaY)
Sets the position of the cursor feedback (the icon showing whether dropping is allowed at the current position and which action a drop will do).
public void setDefaultCursorDeltaX(java.lang.Integer arg)
Sets the user value of the property defaultCursorDeltaX
.
For further details take a look at the property definition: defaultCursorDeltaX
.
public void setDefaultCursorDeltaY(java.lang.Integer arg)
Sets the user value of the property defaultCursorDeltaY
.
For further details take a look at the property definition: defaultCursorDeltaY
.
public void setDestinationWidget(Widget arg)
Sets the user value of the property destinationWidget
.
For further details take a look at the property definition: destinationWidget
.
public void setFeedbackWidget(Widget widget, int deltaX, int deltaY, boolean autoDisposeWidget)
Sets the widget to show as feedback for the user. This widget should represent the object(s) the user is dragging.
public void setSourceWidget(Widget arg)
Sets the user value of the property sourceWidget
.
For further details take a look at the property definition: sourceWidget
.
public void startDrag()
This needed be called from any “dragstart” event to really start drag session.
public void supportsDrop(java.lang.Object vWidget)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |