|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.dnd.DragSource
public class DragSource
Identifies a component that drag and drops can be initiated from.
Drag sources must set the data that will be dragged during a drag operation. The data can be specified either by usingsetData(Object) or,
setting the data via the DND event when a drag begins.
Drag sources are responsible for removing the dragged data from the source
component 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(DNDEvent) and listeners.
| Constructor Summary | |
|---|---|
DragSource(Component component)
|
|
| Method Summary | |
|---|---|
void |
addDNDListener(DNDListener listener)
Adds a drag and drop listener. |
void |
disable()
Disables the drag source. |
void |
enable()
Enables the drag source. |
Component |
getComponent()
Returns the source component. |
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. |
boolean |
isEnabled()
Returns true if the drag source is enabled. |
void |
removeDNDListener(DNDListener listener)
Removes the drag and drop listener. |
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 com.extjs.gxt.ui.client.event.BaseObservable |
|---|
addListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DragSource(Component component)
component - | Method Detail |
|---|
public void addDNDListener(DNDListener listener)
listener - the listener to addpublic void disable()
public void enable()
public Component getComponent()
public java.lang.Object getData()
public Draggable getDraggable()
public java.lang.String getGroup()
public java.lang.String getStatusText()
public boolean isEnabled()
public void removeDNDListener(DNDListener listener)
listener - the listener to removepublic 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 | ||||||||