|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.dnd.core.client.DragSource
public class DragSource
Enables a component to act as the source of a drag and drop operation (i.e. a user can drag data from the component).
Drag sources must set the data that will be dragged during a drag operation. The data can be specified either by usingsetData(Object) or by
setting the data via the DND event when a drag begins.
Drag sources are responsible for removing the dragged data from the source
widget after a valid drop. Use DropTarget.getOperation() to determine
if the data was copied or moved. The target is accessible via the DNDEvent
passed to onDragDrop(DndDropEvent) and listeners.
| Constructor Summary | |
|---|---|
DragSource(Widget widget)
Creates a drag source that enables the specified widget to act as the starting point of a drag operation. |
|
| Method Summary | |
|---|---|
HandlerRegistration |
addDragCancelHandler(DndDragCancelEvent.DndDragCancelHandler handler)
Adds a DndDragCancelEvent.DndDragCancelHandler handler for
DndDragCancelEvent events. |
HandlerRegistration |
addDragStartHandler(DndDragStartEvent.DndDragStartHandler handler)
Adds a DndDragStartEvent.DndDragStartHandler handler for DndDragStartEvent events. |
HandlerRegistration |
addDropHandler(DndDropEvent.DndDropHandler handler)
Adds a DndDropEvent.DndDropHandler handler for DndDropEvent events. |
void |
disable()
Disables the drag source. |
void |
enable()
Enables the drag source. |
java.lang.Object |
getData()
Returns the data to be moved or copied. |
Draggable |
getDraggable()
Returns the draggable instance. |
java.lang.String |
getGroup()
Returns the source's drag drop group. |
java.lang.String |
getStatusText()
Returns the status text. |
Widget |
getWidget()
Returns the source widget. |
boolean |
isEnabled()
Returns true if the drag source is enabled. |
void |
release()
Releases the DragSource from the widget. |
void |
setData(java.lang.Object data)
Sets the data for the drag drop operation. |
void |
setGroup(java.lang.String group)
Sets the drag drop group. |
void |
setStatusText(java.lang.String statusText)
Sets the text to be used on the status proxy object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DragSource(Widget widget)
widget - the widget to serve as the starting point of a drag operation| Method Detail |
|---|
public HandlerRegistration addDragCancelHandler(DndDragCancelEvent.DndDragCancelHandler handler)
DndDragCancelEvent.HasDndDragCancelHandlersDndDragCancelEvent.DndDragCancelHandler handler for
DndDragCancelEvent events.
addDragCancelHandler in interface DndDragCancelEvent.HasDndDragCancelHandlershandler - the handler
public HandlerRegistration addDragStartHandler(DndDragStartEvent.DndDragStartHandler handler)
DndDragStartEvent.HasDndDragStartHandlersDndDragStartEvent.DndDragStartHandler handler for DndDragStartEvent events.
addDragStartHandler in interface DndDragStartEvent.HasDndDragStartHandlershandler - the handler
public HandlerRegistration addDropHandler(DndDropEvent.DndDropHandler handler)
DndDropEvent.HasDndDropHandlersDndDropEvent.DndDropHandler handler for DndDropEvent events.
addDropHandler in interface DndDropEvent.HasDndDropHandlershandler - the handler
public void disable()
public void enable()
public java.lang.Object getData()
public Draggable getDraggable()
public java.lang.String getGroup()
public java.lang.String getStatusText()
public Widget getWidget()
public boolean isEnabled()
public void release()
public void setData(java.lang.Object data)
data - the datapublic void setGroup(java.lang.String group)
group - the group namepublic void setStatusText(java.lang.String statusText)
statusText - the status text
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||